Add NullAdapater

This commit is contained in:
Tema Bolshakov
2014-08-27 08:23:13 +04:00
parent f00fe5595d
commit 56725b45a6
4 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
module ActiveModel
class Serializer
class Adapter
class NullAdapter < Adapter
def serializable_hash(options = {})
{}
end
def to_json(options = {})
serializable_hash.to_json
end
end
end
end
end