Ingo Weiss
2006-Jun-03 12:38 UTC
[Rails] First time plugin user: Problem with "acts_as_versioned"
Hi, I am having trouble with using the acts_as_versioned plugin. I installed the plugin, and ran the migration. acts_as_versioned created the versioned table OK, but when I try to use it I get an error. Here is some console output:>> m = Mymodel.find(:first)NameError: undefined local variable or method `acts_as_versioned'' for Mymodel:Class Did I miss a step? Ingo -- Posted via http://www.ruby-forum.com/.
Ingo Weiss
2006-Jun-03 12:47 UTC
[Rails] Re: First time plugin user: Problem with "acts_as_versioned"
Hi, I found out what the problem was. I alread had a bunch of rows for the model that I wanted to become versioned in the database. Apparently acts_as_versioned doesn''t automatically convert existing rows (i.e. set the version number to 1 and make a copy in the versioned table) which, btw, would be a polite thing to do wouldn''t it? But it works fine for new rows. Ingo Ingo Weiss wrote:> Hi, > > I am having trouble with using the acts_as_versioned plugin. I installed > the plugin, and ran the migration. acts_as_versioned created the > versioned table OK, but when I try to use it I get an error. Here is > some console output: > > >>> m = Mymodel.find(:first) > NameError: undefined local variable or method `acts_as_versioned'' for > Mymodel:Class > > > Did I miss a step? > > Ingo-- Posted via http://www.ruby-forum.com/.