Upgrading ruby to 2.3.4 with rails 3.0.5 -
i trying upgrade rails 3.0.5 application ruby 2.3.4. ruby 1.9.3. able fix things updating gems. however, m stuck on 1 problem when creating new active record objects, time not convert properly.
for example
product.new(:bought_on => date.today) save object bought_on date, not datetime.
i able narrow down problem file
activerecord-3.0.20/lib/active_record/attribute_methods/time_zone_conversion.rb
for reason not calling these 2 functions, define_method_attribute , define_method_attribute=.
any ideas?
i found issue, define_method_attribute under time_zone_conversion.rb protected method, , in ruby 2, respond_to function returns false protected methods. had monkey patch remove protected attribute.
Comments
Post a Comment