I always thought the method names *were* obvious. 'delete' does exactly what it says it does. The callbacks/hooks are named :before_destroy, :dependent => :destroy, etc. They all reference 'destroy' for a reason.
On Wednesday, February 6, 2013, Rodrigo Rosenfeld Rosas wrote: > RTFM. Really, you shouldn't ever just assume what methods do based on > their names. > > Em 06-02-2013 13:19, Benjamin Niemietz escreveu: > >> 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<http://groups.google.com/group/rubyonrails-core?hl=en> >> . >> For more options, visit >> https://groups.google.com/**groups/opt_out<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<http://groups.google.com/group/rubyonrails-core?hl=en> > . > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > > > -- -- Jarrett Meyer Email: [email protected] Web: JarrettMeyer.com <http://jarrettmeyer.com> Twitter: @jarrettmeyer <http://twitter.com/jarrettmeyer> -- 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.
