was it this patch here?

http://rails.lighthouseapp.com/projects/8994/tickets/2089-add-arbasejust_created-to-differenciate-records

RSL

On Wed, Mar 18, 2009 at 11:11 AM, José Valim <[email protected]> wrote:

>
> +1 for existing_record?.
>
> I think I already saw a patch about "existing_record?" in lighthouse.
>
> On Mar 18, 4:04 pm, Mislav Marohnić <[email protected]> wrote:
> > On Wed, Mar 18, 2009 at 13:12, Olly Legg <[email protected]> wrote:
> >
> > > It is along the same lines as the invalid? method. It adds a more
> > > readable method for the opposite functionality.
> >
> > The name "saved_record?" might be misleading -- developers might think
> that
> > this method returns false before the "save" method was called and true
> after
> > the call:
> >
> >   user.saved_record? # => false
> >   user.save
> >   user.saved_record? # => true
> >
> > Of course, this is not what the method does ("dirty?" should be used for
> > this).
> >
> > Why not "existing_record?"
> >
> >   user = User.new
> >   user.existing_record? # => false
> >   user.save
> >   user.existing_record? # => true
> >
> > Sounds much better.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to