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
Closed

touch_with_version should accept more than one argument #1061

westonganger opened this issue Mar 9, 2018 · 3 comments

Comments

@westonganger
Copy link
Contributor

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
Copy link
Member

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
Copy link
Contributor Author

Okay fair enough. Im gonna start looking into this.

@westonganger
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants