On May 18, 2010, at 1:10 PM, Sharagoz wrote:
On May 18, 6:54 pm, Marnen Laibow-Koser <[email protected]> wrote:
Sharagoz wrote:
IMAGE_TYPES = {:1 => 'Photo', :2 => 'Document', :3 => 'Print'}
Not a good idea -- why use :1, :2, :3 instead of actual numbers or
symbolic keys?
Not only is it a bad idea, it's invalid ruby syntax. Integers cant be
symbols.
irb> IMAGE_TYPES = { :"1" => 'Photo', :"2" => 'Document', :"3" =>
'Print' }
=> {:"3"=>"Print", :"1"=>"Photo", :"2"=>"Document"}
But that's not really making the idea any better ;-)
-Rob
Rob Biedenharn
http://agileconsultingllc.com
[email protected]
http://gaslightsoftware.com
[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.