problem with acts_as_versioned

Hi all, I get the following error when trying to use acts_as_versioned plugin:

uninitialized constant ActiveRecord::Acts::Versioned::ClassMethods::Inflector

How can I solve this? Thanks, Rafael Roque

The name of the class is ActiveSupport::Inflector now, you'll have to change the reference on the plugin.

Get inside the plugin code, look for where Inflector is being used and change it to ActiveSupport::Inflector.

First check that the plugin doesn't have a more recent version. I'm using it in a Rails 2.3.2 project fine (but I can't remember if I patched it myself or not)

Andrew Timberlake http://ramblingsonrails.com

http://MyMvelope.com - The SIMPLE way to manage your savings

Browsing through the acts_as_versioned.rb file I found the following:

self.versioned_table_name = options[:table_name] || "#{table_name_prefix}#{Inflector.underscore(Inflector.demodulize(class_name_of_active_record_descendant(self)))}_versions#{table_name_suffix}"

Is it what I must change?

That same line in my version is: self.versioned_table_name = options[:table_name] || "#{table_name_prefix}#{base_class.name.demodulize.underscore}_versions#{table_name_suffix}"

I think you are using an old version and should upgrade http://github.com/technoweenie/acts_as_versioned

Andrew Timberlake http://ramblingsonrails.com

http://MyMvelope.com - The SIMPLE way to manage your savings

Damn it.It worked!! :slight_smile:

Thanks Mauricio and Andrew.