How can I use select_tag to
1. Have a prompt like "Select a Value" ( selected by default )
I tried this but did not work:
<%= select_tag :current_course,
options_for_select( Course.find(:all).map {|p|
[p.title,p.id]} ),
{ :prompt => "Select a Value" }
%>
2. Generate a ''selected'' event so that some action can be done
like
submit the form or refresh the page?
Thanks in advance
- AJ
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---