It's working on latest master code, which rails and ruby version are you
using?
The proper behavior is something like this:
irb(main):005:0> p = Post.first
=> #<Post id: 1, title: "Test", created_at: "2010-04-06 02:33:28",
updated_at: "2010-04-06 02:33:28">
irb(main):006:0> p.title = "Test changes"
=> "Test changes"
irb(main):007:0> p.changes
=> {"title"=>["Test", "Test changes"]}
On Thu, Apr 1, 2010 at 5:28 PM, Joshua Partogi <[email protected]> wrote:
> Hi all,
>
> I have tested the method changes in ActiveModel::Dirty but it doesn't
> return any result.
>
> In my ActiveRecord object I call it as documented:
>
> > person.changes
>
> but it returned null
>
> But when I call other methods in the ActiveModel::Dirty module such as
> `changed` and `changed?`, it returns value(s).
>
> Has the method `changes` been implemented, or do I call the method wrongly?
>
>
> Kind regards,
> Joshua
>
>
> --
> http://twitter.com/scrum8
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-core%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.