Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Rails 4.2 support? #112

Open
keithpitty opened this issue May 29, 2015 · 8 comments
Open

Rails 4.2 support? #112

keithpitty opened this issue May 29, 2015 · 8 comments

Comments

@keithpitty
Copy link

The gem hasn't been upgraded to support Rails 4.2. We've tried the https://github.com/safetypins/vestal_versions fork but it fails when attempts are made to destroy objects (see #111 (comment)).

We're considering moving from Vestal Versions to PaperTrail. However, if Vestal Versions was to be updated to support Rails 4.2 we may reconsider.

@laserlemon @midas @dreamr what are your intentions for Vestal Versions? Do you intend to continue maintaining it?

@dreamr
Copy link
Collaborator

dreamr commented Jun 1, 2015

I haven't looked at this project for a long time and my thoughts (although
I don't speak for laser) but I have no intentions at the moment to update
it as my hands are ties=d up.

On Thu, May 28, 2015 at 8:24 PM, Keith Pitty notifications@github.com
wrote:

The gem hasn't been upgraded to support Rails 4.2. We've tried the
https://github.com/safetypins/vestal_versions fork but it fails when
attempts are made to destroy objects (see #111 (comment)
#111 (comment)
).

We're considering moving from Vestal Versions to PaperTrail. However, if
Vestal Versions was to be updated to support Rails 4.2 we may reconsider.

@laserlemon https://github.com/laserlemon @midas
https://github.com/midas @dreamr https://github.com/dreamr what are
your intentions for Vestal Versions? Do you intend to continue maintaining
it?


Reply to this email directly or view it on GitHub
#112.

Jim OKelly
@thatrubylove

Want to book time with me? http://calendly.com/thatrubylove

Advanced Ruby musings @ RubyLove
https://www.rubylove.io

Expert mentor @ CodeMentor
https://www.codementor.io/thatrubylove

Interested in knowing what I think is good Ruby?
https://github.com/rubylove/ruby_programming_manifesto

@mastedm
Copy link

mastedm commented Jul 20, 2015

+1 for upgrade to Rails 4.2

@stevenjwolfman
Copy link

+1

1 similar comment
@sfandrew
Copy link

sfandrew commented Nov 8, 2017

+1

@amandapouget
Copy link

Anyone want to share their experience migrating from VestalVersions to PaperTrail... or literally any other alternative?

@safetypins
Copy link

@mandysimon88 Yes, I replaced VV with PaperTrail with only a little bit of trouble. But to be honest, I haven't done extensive testing in my app.

There was a little bit of weirdness involved with the migration. Both gems create a "versions" table, but they are different. I didn't have a lot of data to save, so I just added a "drop table" line to the PT migration before running it.

VV did a few things that PT requires extra configuration for. If you want to display individual property changes, rather than just saving different versions you'll need an extra table. Also, if you want PT to track model association changes, you'll need to add an initializer to set "PaperTrail.config.track_associations = true" and yet another table. If you want to track the user who made the changes, you need to add "before_action :set_paper_trail_whodunnit".

If I remember correctly, I followed the instructions in the Readme for PT and it was less painful than I expected. Most of the code changes were just replacing the class name "VestalVersions" with "PaperTrail", although the loading of a version was a little different (I didn't take the time to figure out why, or if this is even necessary): @version = PaperTrail::Version.find(params[:id]) I created a Versions controller to display an individual version and handle version management (reverting); if you think it would be helpful, I can post the diff of my PT conversion.

@amandapouget
Copy link

@safetypins Yes, posting the diff would be really helpful!

Thank you so much for your reply… Since this gem is deprecated so many versions of Rails ago, it’s an unexpected surprise and happy moment to get some really specific advice so quickly! Thank you!

@safetypins
Copy link

safetypins commented Apr 4, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants