Looks like I was missing one step... class_eval. Sorry for the false
alarm!
--Josh
On May 27, 12:26 pm, "Josh N. Abbott" <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I'm working with an app running on Rails 1.2.6 and could really use
> dirty objects just for the sake of being able to track changes. I
> grabbed the dirty.rb from the Rails source and threw it into lib/
> active_record/dirty.rb and when I run require 'active_record/dirty' it
> seems to work but running include ActiveRecord::Dirty gives me this
> error:
>
> >> include ActiveRecord::Dirty
>
> NoMethodError: undefined method `attribute_method_suffix' for
> Object:Class
> from ../../lib/active_record/dirty.rb:38:in `included'
> from (irb):2:in `include'
> from (irb):2
>
>
>
> When I use the require method only and the do
> Model.instance_methods.include?('changed?') it sometimes says true,
> sometimes it says false. When it does say true, it's not actually
> tracking changes and the methods like person.name_was_changed? returns
> a no method error.
>
> If someone can tell me what I'm messing up here, I would appreciate
> it!
>
> Thanks,
> Josh
--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---