File tree Expand file tree Collapse file tree
ruby/hyper-model/lib/reactive_record/active_record Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ def define_attribute_methods
363363 # easier by keeping the columns_hash the same if there are no seralized strings
364364 # see rspec ./spec/batch1/column_types/column_type_spec.rb:100
365365 column_hash [ :serialized? ] = true if ReactiveRecord ::Base . serialized? [ self ] [ name ]
366-
366+
367367 define_method ( name ) { @backing_record . get_attr_value ( name , nil ) } unless method_defined? ( name )
368368 define_method ( "#{ name } !" ) { @backing_record . get_attr_value ( name , true ) } unless method_defined? ( "#{ name } !" )
369369 define_method ( "#{ name } =" ) { |val | @backing_record . set_attr_value ( name , val ) } unless method_defined? ( "#{ name } =" )
@@ -410,7 +410,7 @@ def _react_param_conversion(param, opt = nil)
410410 if key == poly_assoc . polymorphic_type_attribute
411411 model_name = value
412412 already_processed_keys << poly_assoc . association_foreign_key
413- elsif key == poly_assoc . association_foreign_key
413+ elsif key == poly_assoc . association_foreign_key && poly_assoc . polymorphic_type_attribute
414414 model_id = value
415415 already_processed_keys << poly_assoc . polymorphic_type_attribute
416416 end
You can’t perform that action at this time.
0 commit comments