mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Make include_meta and meta_key private
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user