mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Merge pull request #295 from SamSaffron/master
Allow serializers to implement options
This commit is contained in:
commit
9c8ef8006b
@ -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