mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix warnings
JRuby-specific: fix 'warning: (...) interpreted as grouped expression'
This commit is contained in:
@@ -9,6 +9,7 @@ module ActiveModel
|
||||
autoload :Adapter
|
||||
autoload :Lint
|
||||
autoload :Associations
|
||||
autoload :Fieldset
|
||||
include Configuration
|
||||
include Associations
|
||||
|
||||
@@ -66,10 +67,10 @@ module ActiveModel
|
||||
@_attributes_keys[attr] = { key: key } if key != attr
|
||||
@_attributes << key unless @_attributes.include?(key)
|
||||
|
||||
unless respond_to?(key, false) || _fragmented.respond_to?(attr)
|
||||
ActiveModelSerializers.silence_warnings do
|
||||
define_method key do
|
||||
object.read_attribute_for_serialization(attr)
|
||||
end
|
||||
end unless respond_to?(key, false) || _fragmented.respond_to?(attr)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user