acts_as_versioned conflicts?

Dear list, At the moment I am building a simple RESTful wiki. For this I am using Edge Rails. I have a simple Page model which has a couple of associations and acts_as_*. One of them is acts_as_versioned and that one is misbehaving. I should be able to call something like: Page.find_versions(14), this should return an array of Pages, each a different version. However it returns an array with elements of the Page::Version class(OK I can live with this). Also;

p = Page.find(:first) p.find_version(1)

Raises an error: NoMethodError: undefined method `find_version' for #<Page:0x34f57b0>         from /*/vendor/rails/activerecord/lib/active_record/ attribute_methods.rb:205:in `method_missing'         from (irb):54 And that is correct:

p.methods.sort.select {|m| m=~/find/}

=>

I am pretty sure I got everything right as I copied most of it from Rails Recipes. The Page model looks like this:

class Page < ActiveRecord::Base   acts_as_versioned   self.non_versioned_columns << 'project_id' << 'project_user_id' << 'locked_by' << 'locked_at' << 'created_at' << 'updated_at'   acts_as_tree #POSSIBLE CONFLICT

  belongs_to :project   belongs_to :project_user

  validates_presence_of :title, :text, :project_user, :project

end

Am I doing something really dumb? Thanks for any help!

Just to loop back on my own post. I no longer believe it is a confict. A clean Rails 1.2.5 project with only acts_as_versioned also failed to find the method 'find_version'. This leads me to believe the plugin is broken in that respect. Too bad.

It's a class method, not an instance method. If there was an instance method, it might have been removed since it's no longer necessary.

In that case the Rails Recipes book is wrong. I took recipe 20 and there they do something like:

chapter = Chapter.new

...

chapter.find_version(1).title

So what is the recommended way to get your hands on an old version? I am now using something like this:

@page = Page.find(params[:id]) version = Page.find_version(params[:id],params[:page][:version]) @page.revert_to(version)

This works but is hardly the way I would expect it to.