mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Make include_meta and meta_key private
This commit is contained in:
parent
76fead041f
commit
aaa08c25ef
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user