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

Bugfix/add new at nil on scope change #212

Merged

Conversation

greatghoul
Copy link
Contributor

To fix #211 211

@@ -471,7 +471,9 @@ def check_scope
send('decrement_positions_on_lower_items') if lower_item
cached_changes.each { |attribute, values| self[attribute] = values[1] }

send("add_to_list_#{add_new_at}")
if add_new_at.present?
send("add_to_list_#{add_new_at}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a one-liner?

send("add_to_list_#{add_new_at}") if add_new_at.present?

@brendon
Copy link
Owner

brendon commented Jul 9, 2016

Good catch on this one :) Thanks for the test and fix. Looks good to me. If you can just make that one change I'll merge it for you.

@greatghoul
Copy link
Contributor Author

@brendon I fixed the coding style.

@brendon brendon merged commit e6df379 into brendon:master Jul 11, 2016
@brendon
Copy link
Owner

brendon commented Jul 11, 2016

Thanks @greatghoul :) All merged.

@greatghoul greatghoul deleted the bugfix/add_new_at_nil_on_scope_change branch July 11, 2016 14:01
@afn
Copy link

afn commented Jul 14, 2016

Thanks for fixing this!

Can we get a new version pushed to rubygems as well?

@brendon
Copy link
Owner

brendon commented Jul 15, 2016

Yep that's not a problem. I'll push a new version now.

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 this pull request may close these issues.

add_new_at nil with scope causes NoMethodError
3 participants