Make include_meta and meta_key private

This commit is contained in:
Santiago Pastorino 2013-05-08 17:49:30 -07:00
parent 76fead041f
commit aaa08c25ef

View File

@ -1,13 +1,5 @@
module ActiveModel
module Serializable
def meta_key
options[:meta_key].try(:to_sym) || :meta
end
def include_meta(hash)
hash[meta_key] = options[:meta] if options.has_key?(:meta)
end
def as_json(args={})
if root = args[:root] || options[:root]
options[:hash] = hash = {}
@ -30,5 +22,15 @@ module ActiveModel
super
end
end
private
def include_meta(hash)
hash[meta_key] = options[:meta] if options.has_key?(:meta)
end
def meta_key
options[:meta_key].try(:to_sym) || :meta
end
end
end