search for: option&gt

Displaying 5 results from an estimated 5 matches for "option&gt".

2006 Mar 30
3
Rails 1.1, Markaby, options_from_collection
Last night, I upgraded one of my rails apps to 1.1. This app uses Markaby exclusively for its'' views, and once I checked out the latest revisiong of Markaby (r33), everything was working fine except for one thing: select_tag(''province_id'', options_from_collection_for_select(@provinces, "id", "name")) Now returns this (as you see it is spitting out the options both before and after the opening select tag): &lt;option value="2"&gt;Alberta&lt;/option&gt;<br /&gt; &lt;option value="1...
2006 May 22
15
collection_select default selected value
Hiall, Unfortunately I just can''t find out how to setup a default selected value when using collection_select. My call is like so: <%= collection_select(:consultant, :lastname, @consultants, :id, :lastname, { :selected =&gt; @current_consultant.id } ) %&gt; which is not working, I debugged so far that I know that @current_consultant.id contains the correct value. Any tips? cheers
2005 Oct 26
1
Re: collection_select question about selected_value
...the second item. &gt; (BTW, using the selected_value as a string doesn¹t work either) &gt; &gt; Am I doing something wrong, or is this impossible? &gt; &gt; If impossible, any ideas on what other method might get me the &gt; auto-error-highlighting I want? select( :client, :company_id, options_from_collection_for_select(@companies, :id, :name, selected_value=2), :prompt =&gt; "Please select a company..." ) -- We develop, watch us RoR, in numbers too big to ignore.
2010 Jun 17
1
Problem with options_for_select
Hi, I have a problem with the form select. In the value field I have the generated html... <%= f.select :brand_id, options_for_select([[''Brands'', 0]] + @search_brands.map { |b| [b.name, b.id]}), {:id =&gt; ''cbxBrand'', :tabindex =&gt; (@tabindex += 1)} %&gt; This is the html: <select name="search[brand_id]" id="search_brand_id"&gt; <optio...
2010 Sep 17
1
option_groups_from_collection_for_select
Hi, in my development environment (Ruby 1.87, Rails 2.3.8) the following code works fine: <%= select "applicant", "member_1", option_groups_from_collection_for_select(@topics, :members, :topic, :id, :name, @applicant.member_1), {:include_blank =&gt; true} %&gt; Producing: <optgroup label="Clinical Neuroscience"&gt; <option value="1"&gt;Prof ...</option&gt; <option value="2"&gt;Prof ......