Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5 - undefined method `arel_attributes_with_values_for_create' #21

Open
cryptomatictrader opened this issue Aug 23, 2018 · 5 comments

Comments

@cryptomatictrader
Copy link

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'
@einzige
Copy link
Owner

einzige commented Aug 24, 2018

We'll figure this out soon

@robklassy
Copy link

Is there a workaround for this?

@tushar0837
Copy link

any updates here @einzige

@yossiedri
Copy link

im having the same error Is there a fix for this?
rails 5 ruby 2.6

@robklassy
Copy link

@yossiedri I don't think there is a fix, I basically had to write the method myself to make it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants