mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06: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
|
end
|
||||||
|
|
||||||
def include?(name)
|
def include?(name)
|
||||||
return false if options.key?(:only) && !Array(options[:only]).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?(:except) && Array(@options[:except]).include?(name)
|
||||||
send INCLUDE_METHODS[name]
|
send INCLUDE_METHODS[name]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user