Frederick Cheung | 18 May 02:44
Gravatar

Re: Select and how to read the api


On 17 May 2008, at 21:03, Phlip wrote:

>
>>> (And note to whoever named a method 'select' - please don't!!!)
>
>> Why not use 'select'? It works fine.
>
> Because programs must share a large namespace in memory, and a  
> larger one in
> our brains. 'select' is already used by Array, certain network  
> sockets, and
> (in some languages) a keyword. Primitive things should have primeval  
> names,
> such as 'select', and complex & specific things should have  
> decorated names.
> If all the other Rails HTML generators end in _tag, then select_  
> should too!

There is a select_tag helper, which is different. In the same way that  
the raw check_box_tag, text_field_tag have equivalents without the  
_tag that operate on a controller instance variable, select_tag's  
equivalent is plain old select. select can mean a bunch of different  
things but then again we frequently overload operators, so why not  
method names too ?

Fred

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane