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

Search unscoped class when saving state without validation #433

Merged
merged 1 commit into from
Mar 16, 2017

Conversation

larissa
Copy link
Contributor

@larissa larissa commented Jan 24, 2017

Records that are outside of default_scope on ActiveRecord don't transition when skip_validation_on_save: true. I fixed the issue by searching for the record with unscoped.where instead of just .where.

@anilmaurya
Copy link
Member

Hi @larissa , Thank you for reporting issue and sending patch.

Can you add specs for this case so that we don't break in future ?

@larissa
Copy link
Contributor Author

larissa commented Feb 28, 2017

@anilmaurya sure! I'll add specs as soon as I get a chance.

@larissa larissa force-pushed the default-scope-inconsitency branch from 496d433 to fac6904 Compare March 2, 2017 06:01
@larissa larissa force-pushed the default-scope-inconsitency branch from fac6904 to bc343b8 Compare March 2, 2017 06:17
@larissa
Copy link
Contributor Author

larissa commented Mar 2, 2017

@anilmaurya I fixed specs and added a new one. Let me know if you need any changes.

@anilmaurya anilmaurya merged commit 06d3e23 into aasm:master Mar 16, 2017
@anilmaurya
Copy link
Member

@larissa Thank you for contributing 👍

@larissa larissa deleted the default-scope-inconsitency branch March 16, 2017 15:21
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.

2 participants