einzige / sneaky-save

Allows to update complex objects without triggering validations or callbacks.
45 stars 30 forks source link

sneaky_update fails on Rails3 for models with serialized columns #11

Closed ritikesh closed 7 years ago

ritikesh commented 8 years ago

Hi

Good work with the gem.

I noticed that sneaky_update fails if the model contains a serialized attribute. it's because, rails 3 doesn't directly convert serialized attributes. Also, for each sneaky update, all fields were being set instead of setting only the ones that actually changed. For smaller tables, this isn't a concern. But might impact on larger tables.

Let me know if you have any concerns/feedback. :)

Thanks!

ritikesh commented 8 years ago

any updates on this one?

einzige commented 7 years ago

@ritikesh sorry, was off for a while :)

einzige commented 7 years ago

@ritikesh LGTM, let's fix the dog issues :)

ritikesh commented 7 years ago

@einzige no issues at all. :) Sure. Let me know if you're expecting something from my end. P.S: this is my first PR, so please excuse me if I miss something obvious.

einzige commented 7 years ago

@ritikesh we have a CI working here. You can see its comments in the pull request (eg https://github.com/einzige/sneaky-save/pull/11#discussion-diff-68560934). Just go through the comments and make updates accordingly so it never complains again.

So basically this:

image

must have a green color (travis) and "no violations found" next to the dog :)

ritikesh commented 7 years ago

@einzige I've no idea why it's complaining about the inconsistent indentation. I can't seem to find any inconsistencies. And the build fails are due to activesupport requiring ruby >= 2.2.2. Not sure what I can do there? Thanks for being patient with me on this! :)

einzige commented 7 years ago

@ritikesh as for the activesupport, you just tune up .travisci at the root of the project. Thanks!

ritikesh commented 7 years ago

@einzige I'm not able to view the build info? also, I'm not very sure what I need to do to get rid of the activesupport issue. Should I change the dependency on the .gemspec file itself? or just the build? The gemspec lists activerecord >= 3.2.0 which might also fail if activesupport is not already installed. Correct me if I'm wrong.

einzige commented 7 years ago

@ritikesh sent you an invitation to collaborators, it should fix the access issue with Travis. Build configuration is what we need to change to make it work correctly.

The gemspec lists activerecord >= 3.2.0 which might also fail if activesupport is not already installed.

If it is provided in gemspec this way, then activesupport will be installed according to installed activerecord version gemspec.


If you struggle with this, you can close this PR and reopen it from a branch you cut in my origin repo, so I can commit proper configuration (you are collaborator after accepting invitation I just sent).

ritikesh commented 7 years ago

If you struggle with this, you can close this PR and reopen it from a branch you cut in my origin repo, so I can commit proper configuration (you are collaborator after accepting invitation I just sent).

Will do that. I'm kinda confused with the whole build thing and do not have enough time to spend on it. Thanks again. :)