Hi,
used this to send the ID in params & display name in the select box.
select_tag "user", options_from_collection_for_select(User.all, :id, :name)
For adding option & showing selected params,
select_tag "user_id", "<option>select one</option>" + options_from_collection_for_select(User.all, :id, :name, params[:user_id].to_i)
--
sri.
my blog is abt wht i have learnt technically, mostly in Ruby on Rails, Javascript, node.js hope this share a little bit of info & adds a bit stuff., Thanks.
Monday, August 30, 2010
Thursday, August 19, 2010
Image submit tag without border
Hi, I used image_submit_tag to submit my form. worked fine.. but the
image is displayed with border.
I used border => 0 but no use.
This is was code.
<%= image_submit_tag "../images/upload.png", :border => 0 %>
& This worked
<%= image_submit_tag "../images/upload.png", :style => "border: none;" %>
-
Sri
image is displayed with border.
I used border => 0 but no use.
This is was code.
<%= image_submit_tag "../images/upload.png", :border => 0 %>
& This worked
<%= image_submit_tag "../images/upload.png", :style => "border: none;" %>
-
Sri
Subscribe to:
Posts (Atom)