Displaying 1 result from an estimated 1 matches for "status_index".
Did you mean:
states_index
2006 Jul 19
1
Updating a model from a checkbox (noob question)
...in a view to update the database. When I
select something in the combobox and press ''update'' it goes through
fine, except it places the default value for the field of the combobox.
Any suggestions?
Here''s the model:
class TestResult < ActiveRecord::Base
has_one :status_index
has_one :test_type
has_one :product_area
validates_presence_of :statusindex_id, :testtype_id, :productarea_id,
:name
end
This generates the combobox (inside a view partial):
<%= select("test_type", "id", TestType.find_all.collect {|tt| [tt.name,
tt.id] }, { :includ...