Merge pull request #15 from sbounmy/master

documentation update
This commit is contained in:
José Valim 2011-12-16 12:18:05 -08:00
commit 8d20058bf3

View File

@ -193,10 +193,6 @@ JSON. In the above example, the +title+ and +body+ attributes were always includ
class PostSerializer < ActiveModel::Serializer class PostSerializer < ActiveModel::Serializer
attributes :title, :body attributes :title, :body
def initialize(post, scope)
@post, @scope = post, scope
end
def serializable_hash def serializable_hash
hash = attributes hash = attributes
hash.merge!(super_data) if super? hash.merge!(super_data) if super?