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

Fix field is reseted to default if error happened #3066

Merged
merged 1 commit into from
Sep 24, 2018
Merged

Fix field is reseted to default if error happened #3066

merged 1 commit into from
Sep 24, 2018

Conversation

lazebny
Copy link
Contributor

@lazebny lazebny commented Sep 12, 2018

When error is raised for some object in instance_eval(&value) then instance_variable_set("@#{option_name}_recurring", false) won't be reset. As a result all other objects (from that model) will have a default value instead of custom value (even if they do not raise an error).

@mshibuya
Copy link
Member

Needs a test case, could you write one?

@lazebny
Copy link
Contributor Author

lazebny commented Sep 14, 2018

Sure thing, will do)

@lazebny
Copy link
Contributor Author

lazebny commented Sep 17, 2018

@mshibuya i added test, please check it

@mshibuya
Copy link
Member

Rubocop check is failing:
https://travis-ci.org/sferik/rails_admin/jobs/432086755#L1183

@lazebny
Copy link
Contributor Author

lazebny commented Sep 24, 2018

Sorry, I missed it. Checks are green now.

@mshibuya mshibuya merged commit 875dcb4 into railsadminteam:master Sep 24, 2018
@mshibuya
Copy link
Member

Awesome, thanks!

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.

None yet

2 participants