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

touch_with_version should accept more than one argument #1061

Closed
westonganger opened this issue Mar 9, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@westonganger
Copy link
Contributor

commented Mar 9, 2018

The method touch_with_version only accepts one optional attribute:

https://github.com/airblade/paper_trail/blob/master/lib/paper_trail/record_trail.rb#L465

To behave the same as the ActiveRecord touch method it needs to accept multiple optional attributes (and apparently a Time as well since Rails v5.0)

http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-touch

Just documenting this issue before I create a PR.

@jaredbeck

This comment has been minimized.

Copy link
Member

commented Mar 12, 2018

To behave the same as the ActiveRecord touch method ..

If this is going to be a goal of ours, maybe it's time to re-investigate hooking into the after_touch callback and deprecate touch_with_version.

@westonganger

This comment has been minimized.

Copy link
Contributor Author

commented Mar 13, 2018

Okay fair enough. Im gonna start looking into this.

@westonganger

This comment has been minimized.

Copy link
Contributor Author

commented Mar 17, 2018

Closing this issue because the touch_with_version method is deprecated in v9.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.