Sam Joseph
2005-Nov-15 19:56 UTC
acts_as_paranoid --> undefined method `constrain'' for class `Class''
Hi All, So I thought I had this acts_as_paranoid problem previously and fixed by going to rails 0.14.2, although I''m not 100% it was the same thing. I''m now on rails 0.14.3 and I''m getting: undefined method `constrain'' for class `Class'' for any model that includes acts_as_paranoid. My application trace is below. Has anyone else got this and know a way round it? Does anyone know what the error actually means? /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.1.7/lib/acts_as_paranoid.rb:57:in `alias_method'' /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.1.7/lib/acts_as_paranoid.rb:57:in `included'' /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.1.7/lib/acts_as_paranoid.rb:50:in `acts_as_paranoid'' #{RAILS_ROOT}/app/models/record.rb:7 #{RAILS_ROOT}/app/controllers/records_controller.rb:19:in `list'' Many thanks in advance. CHEERS> SAM
Rick Olson
2005-Nov-15 20:37 UTC
Re: acts_as_paranoid --> undefined method `constrain'' for class `Class''
On 11/15/05, Sam Joseph <sam-wUweuJJ0J032eFz/2MeuCQ@public.gmane.org> wrote:> Hi All, > > So I thought I had this acts_as_paranoid problem previously and fixed by > going to rails 0.14.2, although I''m not 100% it was the same thing. > > I''m now on rails 0.14.3 and I''m getting: > > undefined method `constrain'' for class `Class'' > > for any model that includes acts_as_paranoid. My application trace is below. > > Has anyone else got this and know a way round it? Does anyone know what > the error actually means? > > /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.1.7/lib/acts_as_paranoid.rb:57:in > `alias_method'' > /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.1.7/lib/acts_as_paranoid.rb:57:in > `included'' > /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.1.7/lib/acts_as_paranoid.rb:50:in > `acts_as_paranoid'' > #{RAILS_ROOT}/app/models/record.rb:7 > #{RAILS_ROOT}/app/controllers/records_controller.rb:19:in `list'' > > Many thanks in advance. > > CHEERS> SAM >RC4 totally changed the constrain method, so I had to rework some things. It has been fixed in subversion for some time (http://techno-weenie.net/svn/projects/plugins/acts_as_paranoid. I''ve been having some issues with my rubyforge uploader, so I just now uploaded the updated gem. -- rick http://techno-weenie.net