Forum: Ruby on Rails act_as_versioned and join tables?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D93fed33f55f712819355f4bb20316ef?d=identicon&s=25 David W. (dawillis)
on 2006-06-13 16:35
Greetings!

I'm attempting to use the act_as_versioned plugin to provide versioning
functionality for my rails app, but can't think my way through this:

How can you use act_as_versioned to perform versioning on a HABTM join
table?  It is easy to see how to do so for join models (:has_many
:through) but not so for the join table.

I want to use act_as_versioned to maintain both a change record for the
database and as a method to maintain snapshots of the database at
particular points in time.  It is possible that the records associated
via the join table may be associated in one snapshot, not associated in
a later snapshot, and related again in a still later snapshot.

Any help with this issue would be greatly appreciated.

David.
Rick Olson (Guest)
on 2006-06-13 16:50
(Received via mailing list)
On 6/13/06, David Willis <dawillis@gmail.com> wrote:
> database and as a method to maintain snapshots of the database at
> particular points in time.  It is possible that the records associated
> via the join table may be associated in one snapshot, not associated in
> a later snapshot, and related again in a still later snapshot.
>
> Any help with this issue would be greatly appreciated.
>
> David.

acts_as_versioned doesn't even attempt to do this.  Try this:
http://livsey.org/articles/2006/06/08/acts_as_vers...
D93fed33f55f712819355f4bb20316ef?d=identicon&s=25 David W. (dawillis)
on 2006-06-13 17:35
Rick Olson wrote:
> On 6/13/06, David Willis <dawillis@gmail.com> wrote:
>> database and as a method to maintain snapshots of the database at
>> particular points in time.  It is possible that the records associated
>> via the join table may be associated in one snapshot, not associated in
>> a later snapshot, and related again in a still later snapshot.
>>
>> Any help with this issue would be greatly appreciated.
>>
>> David.
>
> acts_as_versioned doesn't even attempt to do this.  Try this:
> http://livsey.org/articles/2006/06/08/acts_as_vers...

Thanks! I'll take a look at it.

David.
Richard Livsey (Guest)
on 2006-06-13 18:58
(Received via mailing list)
David Willis wrote:
>> acts_as_versioned doesn't even attempt to do this.  Try this:
>> http://livsey.org/articles/2006/06/08/acts_as_vers...
>
> Thanks! I'll take a look at it.
>
> David.
>

Drop me a line if you need any help with it as documentation is
non-existant at the moment! I'm working on that along with making it
generally easier and more configurable over the next few days.
Steven Talcott Smith (Guest)
on 2006-06-13 19:26
Richard Livsey wrote:
> David Willis wrote:
>>> acts_as_versioned doesn't even attempt to do this.  Try this:
>>> http://livsey.org/articles/2006/06/08/acts_as_vers...
>>
>> Thanks! I'll take a look at it.
>>
>> David.
>>
>
> Drop me a line if you need any help with it as documentation is
> non-existant at the moment! I'm working on that along with making it
> generally easier and more configurable over the next few days.

I too would like to use this.  Being relatively new -- how do I install
this with the "gem install" command?

acts_as_versioned was magically recognized.

Steven
Richard Livsey (Guest)
on 2006-06-13 19:57
(Received via mailing list)
Steven Talcott Smith wrote:
>> generally easier and more configurable over the next few days.
>
> I too would like to use this.  Being relatively new -- how do I install
> this with the "gem install" command?
>
> acts_as_versioned was magically recognized.
>
> Steven
>

It's just in the SVN repository at the moment, there's no GEM.

You can either check it out of the repository and put it in the plugins
folder, or use svn:externals to do that for you if your project is under
subversion.
Leon Leslie (Guest)
on 2006-06-13 20:20
(Received via mailing list)
This is like dreams coming true..... acts_as_versioned_association
Steven Talcott Smith (Guest)
on 2006-06-13 22:44
Richard Livsey wrote:
> It's just in the SVN repository at the moment, there's no GEM.
>
> You can either check it out of the repository and put it in the plugins
> folder, or use svn:externals to do that for you if your project is under
> subversion.

Thanks - I think this is going to get rid of a ton of CRUD from my old
app...

Steven
Rick Olson (Guest)
on 2006-06-14 03:04
(Received via mailing list)
> I too would like to use this.  Being relatively new -- how do I install
> this with the "gem install" command?
>
> acts_as_versioned was magically recognized.
>
> Steven

The gem version is old, you should use the rails plugin.  I actually
released that before rails had plugins.
Steven Talcott Smith (Guest)
on 2006-06-14 15:48
Rick Olson wrote:

> The gem version is old, you should use the rails plugin.  I actually
> released that before rails had plugins.

Thanks I found this out from your website when googling the error
generated by the migration.
This topic is locked and can not be replied to.