sneaky-save
sneaky-save copied to clipboard
Rails 5 - undefined method `arel_attributes_with_values_for_create'
Anyone is using this gem with Rails 5? It looks like Rails 5 AR doesn't have "arel_attributes_with_values_for_create" anymore and thus it's broken.
Any suggestion?
[2018-08-23 10:08:54.327799 #22071] ERROR: undefined method `arel_attributes_with_values_for_create' for #<Candy:0x00007fd047782fe8>
[2018-08-23 10:08:54.328175 #22071] ERROR: /Users/calvin/.rvm/gems/ruby-2.5.1/gems/activemodel-5.2.1/lib/active_model/attribute_methods.rb:430:in `method_missing'
/Users/calvin/.rvm/gems/ruby-2.5.1/gems/sneaky-save-0.1.3/lib/sneaky-save.rb:87:in `sneaky_attributes_values'
/Users/calvin/.rvm/gems/ruby-2.5.1/gems/sneaky-save-0.1.3/lib/sneaky-save.rb:45:in `sneaky_create'
/Users/calvin/.rvm/gems/ruby-2.5.1/gems/sneaky-save-0.1.3/lib/sneaky-save.rb:33:in `sneaky_create_or_update'
/Users/calvin/.rvm/gems/ruby-2.5.1/gems/sneaky-save-0.1.3/lib/sneaky-save.rb:16:in `sneaky_save'
We'll figure this out soon
Is there a workaround for this?
any updates here @einzige
im having the same error Is there a fix for this? rails 5 ruby 2.6
@yossiedri I don't think there is a fix, I basically had to write the method myself to make it work