mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
@@ -1,21 +0,0 @@
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
class Responder < ::ActionController::Responder #:nodoc:
|
||||
|
||||
protected
|
||||
def display(resource, given_options = {})
|
||||
if format != :json
|
||||
super
|
||||
else
|
||||
json = Serializer.build_json(controller, resource, options)
|
||||
|
||||
if json
|
||||
render given_options.merge(options).merge(:json => json)
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user