Displaying 3 results from an estimated 3 matches for "to_collection_select_tag".
2005 Jul 06
1
collection_select not selecting the selected item
...on value="8">Introduction</option>
<option value="7">Programming</option>
</select></p>
Notice no values are selected, even there is a selection (7, to be
exact). So, I dug up in the Rails code, and I found
ActionView::Helpers::InstanceTag#to_collection_select_tag. Except line
4 of this method is:
"select", add_blank_option(
options_from_collection_for_select(
collection, value_method, text_method, value),
options[:include_blank]), html_options
[split for readability; looking at r1739, line 306:
http://dev.rubyonrails.org/svn/rails/t...
2005 Jun 13
3
validations not working with collection population droplists
...on: /reviews/new_curriculum.rhtml
Show template trace
/usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_view/helpers/form_options_helper.rb:139:in
`options_from_collection_for_select''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_view/helpers/form_options_helper.rb:304:in
`to_collection_select_tag''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_view/helpers/form_options_helper.rb:66:in
`collection_select''
(erb):16:in `evaluate_locals''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_view/base.rb:265:in
`evaluate_locals''
/usr/lib/ruby/gems/1...
2010 Jul 16
31
Added associations but don't see generated methods
Hi,
I''ve got a Rails app working that includes two two classes, etc.:
Expense & Vendor. I eventually learned that the mental concept I had
of their relationship should be express in Rails as:
class Expense < ActiveRecord::Base; belongs_to :vendor; end
class Vendor < ActiveRecord::Base; has_many :expenses; end