I don't think we should do anything with this method. The documentation is
clear about how it works.



Deletes the record in the database and freezes this instance to reflect
that no changes should be made (since they can’t be persisted). Returns the
frozen instance.

The row is simply removed with an SQL DELETE statement on the record’s
primary key, and no callbacks are executed.

To enforce the object’s before_destroy and after_destroy callbacks or any
:dependent association options, use #destroy

Rafael Mendonça França
http://twitter.com/rafaelfranca
https://github.com/rafaelfranca


On Wed, Feb 6, 2013 at 1:19 PM, Benjamin Niemietz <
[email protected]> wrote:

> I suggest deprecating the .delete method. Since it bypasses the callbacks
> and dependent destroys, it can really mislead beginning users. Or a
> possible fix would be renaming it to a less friendly name that would be
> used. I see programmers that come over from other languages assuming this
> is the traditional syntax for a common way to remove an record.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to