try '@record.new_record'

http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001843

On Thu, Jul 1, 2010 at 9:57 PM, badnaam <[email protected]> wrote:
> Is it possible to check if the record that is about to be saved is a
> brand new record or an update? I am trying to do this inside a
> before_save callback.
>  I am on rails 2.3.8
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" 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-talk?hl=en.
>
>



-- 
Filipe Quadros Borges

email: [email protected]
msn: [email protected]

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en.

Reply via email to