Repository navigation
Provide :touch option to save() to accommodate saving without updating t... - #18225
Conversation
74523ad to
4f35c58
Compare
There was a problem hiding this comment.
Let's just use normal splat here.
4f35c58 to
4fb4b14
Compare
|
Looks like the tests are failing. |
4fb4b14 to
3d46aa0
Compare
|
Sorry, all green now. Had to adjust the signatures of the other methods in the inheritance chain. |
There was a problem hiding this comment.
Can you use the double splat here as well? Not strictly necessary, but will allow for potential performance improvements on the ruby side (skipping a hash allocation)
There was a problem hiding this comment.
Actually could this be written as:
def _update_record(*args)
partial_writes? ? super(keys_for_partial_write(*args) : super|
Last set of minor comments, then this is good to go |
3d46aa0 to
e780e2f
Compare
…tamps Provide :touch option to save() to accommodate saving without updating t...
|
What is the difference of this and |
|
hmmmm. At least we can make the implementation of both use the same thing? I dislike the idea of having the same idea implemented in two places. |
|
Ah, |
|
I can certainly look into that.
|
|
Also even if we did use the same implementation for both, almost all of the code which changed was for the signature, not the actual implementation of skipping the timestamps. |
ActiveRecord::Base `save` and `save!` take an option boolean `:touch` parameter since rails#18225 (stems from rails#18202). This commit document that parameter. [ci skip]
...imestamps. [#18202]