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 -- Posted via http://www.ruby-forum.com/.
The name of the class is ActiveSupport::Inflector now, you''ll have to change the reference on the plugin. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Fri, Jul 3, 2009 at 9:45 AM, Rafael Roque<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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 > -- > Posted via http://www.ruby-forum.com/. > > > >
Maurício Linhares wrote:> The name of the class is ActiveSupport::Inflector now, you''ll have to > change the reference on the plugin. > > - > Maur�cio Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr > > > > On Fri, Jul 3, 2009 at 9:45 AM, RafaelMauricio, what do you mean by "reference on the plugin"? -- Posted via http://www.ruby-forum.com/.
Get inside the plugin code, look for where Inflector is being used and change it to ActiveSupport::Inflector. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Fri, Jul 3, 2009 at 9:54 AM, Rafael Roque<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Maurício Linhares wrote: >> The name of the class is ActiveSupport::Inflector now, you''ll have to >> change the reference on the plugin. >> >> - >> Maur�cio Linhares >> http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr >> >> >> >> On Fri, Jul 3, 2009 at 9:45 AM, Rafael > > Mauricio, > what do you mean by "reference on the plugin"? > > -- > Posted via http://www.ruby-forum.com/. > > > >
2009/7/3 Maurício Linhares <mauricio.linhares-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > 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
Andrew Timberlake wrote:> 2009/7/3 Maur�cio Linhares <mauricio.linhares-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >> >> 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 savingsHi Andrew, I´m using Rails 2.2.2 and acts_as_versioned 0.2.3 -- Posted via http://www.ruby-forum.com/.
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? -- Posted via http://www.ruby-forum.com/.
On Fri, Jul 3, 2009 at 3:35 PM, Rafael Roque<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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