mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Merge pull request #512 from TimPetricola/fix-options-access
Custom options are accessible in serializer
This commit is contained in:
@@ -136,8 +136,9 @@ end
|
||||
@only = options[:only] ? Array(options[:only]) : nil
|
||||
@except = options[:except] ? Array(options[:except]) : nil
|
||||
@key_format = options[:key_format]
|
||||
@context = options[:context]
|
||||
end
|
||||
attr_accessor :object, :scope, :root, :meta_key, :meta, :key_format
|
||||
attr_accessor :object, :scope, :root, :meta_key, :meta, :key_format, :context
|
||||
|
||||
def json_key
|
||||
key = if root == true || root.nil?
|
||||
|
||||
Reference in New Issue
Block a user