mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Handle render.ams with nil serializer or adapter
This commit is contained in:
17
lib/active_model/serializer/null.rb
Normal file
17
lib/active_model/serializer/null.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
class Null < Serializer
|
||||
def attributes(*)
|
||||
{}
|
||||
end
|
||||
|
||||
def associations(*)
|
||||
{}
|
||||
end
|
||||
|
||||
def serializable_hash(*)
|
||||
{}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user