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

add_new_at nil with scope causes NoMethodError #211

Closed
greatghoul opened this issue Jul 8, 2016 · 0 comments · Fixed by #212
Closed

add_new_at nil with scope causes NoMethodError #211

greatghoul opened this issue Jul 8, 2016 · 0 comments · Fixed by #212

Comments

@greatghoul
Copy link
Contributor

acts_as_list scope: :brand_category, add_new_at: nil

When scope was set, error raised:

E, [2016-07-08T13:59:17.135900 #7403] ERROR -- : NoMethodError: undefined method `add_to_list_' for #<Item:0x007fea3942c748>
Did you mean?  add_to_transaction
  /vendor/bundle/ruby/2.3.0/gems/activemodel-4.2.6/lib/active_model/attribute_methods.rb:433:in `method_missing'
  /vendor/bundle/ruby/2.3.0/gems/acts_as_list-0.7.4/lib/acts_as_list/active_record/acts/list.rb:476:in `check_scope'

https://github.com/swanandp/acts_as_list/blob/master/lib/acts_as_list/active_record/acts/list.rb#L474

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

Successfully merging a pull request may close this issue.

1 participant