I stand corrected :) Thanks for the link. 

I'm still having a hard time looking for the semantics of "find!" (I mean -
what's the dangerous operation being performed?)

I'll keep reading your posts and think about it :)


-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob Sanheim
Sent: Wednesday, August 30, 2006 10:14 PM
To: [email protected]
Subject: [Rails-core] Re: :throw option for AR finders that don't throw
RecordNotFound exceptions


On 8/30/06, Damian Janowski <[EMAIL PROTECTED]> wrote:
>
> IMHO bang wouldn't follow Ruby's convention (ie that "!" makes 
> something destructive to the object).
>
> Something along "find_or_raise" would follow Rails' "find_or_create"
> convention.
>
> But +1 to load vs find. Sounds cool.

Actually, if you search around ruby-talk the bang methods can just be used
more generally to mean a "dangerous operation".  At least this is what I
found in a thread from 04:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/120093

So using find! would be totally appropriate....for a similiar example in
core ruby see Kernel#exit and exit!.

- rob

--
http://www.robsanheim.com
http://www.seekingalpha.com
http://www.ajaxian.com





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

Reply via email to