RailsCasts Pro episodes are now free!

Learn more or hide this

Andy Stewart's Profile

GitHub User: airblade

Site: http://airbladesoftware.com

Comments by Andy Stewart

Avatar

@Andrew Greenberg, a small correction: Paper Trail doesn't lose a deleted resource's assocations. They're all present and correct in its versions table.

The hassle (for now) is that you have to restore the assocations from that information yourself, rather than Paper Trail doing it for you. If you think of a good way to do this, please let me know.

Avatar

@Ryan, thanks for this -- a far neater implementation of undo than in my own apps! Also, using `scoped` is a good trick.

@Steve, automatically bringing back dependent associations is something I haven't cracked yet. I've tried a couple of times but so far haven't come up with code I like. All patches welcome.

Avatar

As it happens, I was wrapping up simple username/password authentication into a gem when this RailsCast came out:

https://github.com/airblade/quo_vadis