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:inmethod_missing’
from (irb):54
from :0
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:
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.
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.