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

Only update attributes that get changed instead of all of them #58

Merged
merged 1 commit into from
Jan 18, 2017
Merged

Only update attributes that get changed instead of all of them #58

merged 1 commit into from
Jan 18, 2017

Conversation

npezza93
Copy link
Contributor

@npezza93 npezza93 commented Jan 18, 2017

Currently when calling #save_draft on an object that is getting updated, it updates all columns no matter if they have changed or not. This only updates the changed columns.

I had run into an issue when a column has a mounted_uploader and an error gets thrown:
TypeError: can't quote ImageUploader. I handle images in a different form not using draftsman so it shouldn't be getting called when updating the record. It would also seem Carrierwave's upgrade to 1.0.0 has broken some stuff which is what is causing the TypeError but that's a separate issue.

@chrisdpeters chrisdpeters merged commit 936d5a3 into copasetickid:master Jan 18, 2017
@chrisdpeters
Copy link
Collaborator

Thank you, @npezza93. Anything that we can do to make this gem more efficient is a big win.

@chrisdpeters chrisdpeters added this to the 0.6.1 milestone Mar 14, 2017
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