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!