json.extract! directory, :id, :path, :created_at, :updated_at json.url directory_url(directory, format: :json)