allow serializers to implement an options attribute

This commit is contained in:
Sam 2013-05-06 10:30:46 +10:00
parent a022d464f5
commit 597a2e3148

View File

@ -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