On May 11, 12:18 pm, nishi <[email protected]> wrote:
>
>  <%=select_tag( :cons_attribute_id[],options_from_collection_for_select
> (Attribute.find_all_by_attributetype("cons"),
>                 "id", "name", 3),:multiple=>true) %>
>
>   but it gives error.. such as method not defined

when you write :foo[] ruby thinks that you want to call the [] method
on the symbol :foo. You can be explicit that you want the symbol with
content foo[] by doing :'foo[]'
In this case you could also just pass a string to select_tag

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

Reply via email to