pradeep83.achu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2013-Sep-09  21:44 UTC
append hardcoded value in rails2 f.select_tag
Hi,
I have a dropdown in my rails partial which onchange calling a remote 
function...I am using rails2.3 verison.. In the drop down I am retreiving 
list of students like this..
    <%= select :students, :id,
                         @students.map {|s| [s.name, s.id] },
                         {:prompt => "Select A Student"},
                         {:onchange => "#{remote_function(
                                 :url => { :action =>
''type'' },
                                 :method => ''get'',
                                 :with =>
"''stud_id=''+value",
                                 :before =>
"Element.show(''loader'')",
                                 :success =>
"Element.hide(''loader'')"  )}"}
%>
This is working fine... I get list of students with their ids as values.. 
But I need to add one more option as "All students" to the dropdown so
that
I can view the details of all the students. How would I achieve it. Please 
put your thoughts on this as I am new to rails and learning it...
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/bff81204-dacb-420f-92b2-0152d88cc4d1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.