mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
allow serializers to implement an options attribute
This commit is contained in:
parent
a022d464f5
commit
597a2e3148
@ -368,8 +368,8 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def include?(name)
|
||||
return false if options.key?(:only) && !Array(options[:only]).include?(name)
|
||||
return false if options.key?(:except) && Array(options[:except]).include?(name)
|
||||
return false if @options.key?(:only) && !Array(@options[:only]).include?(name)
|
||||
return false if @options.key?(:except) && Array(@options[:except]).include?(name)
|
||||
send INCLUDE_METHODS[name]
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user