I’m struggling understanding the model view of a combined model. Take
the following:
class P4 < ActiveRecord::Base
has_many :p4_priorities
end
I figured out the naming and referencing of the sub models (i.e.
P4.p4_priorities - seems simple enough but I had weird issues related to
it). I’m all ok except that I am having issues with how to reference a
‘sub-model’ in a form field. This is what I have:
<%= text_field 'p4_p4_priorities', 'detail', :size => 75 %>
No errors - it’s just not saving which tells me the framework isn’t
understanding what to save. Can you help?
Also, the models associated with the related tables have validation but
that doesn’t apparently roll up into the combined edit I am providing.
Is that expected? If so, how do I reference those fields in validation
in this model? Just a typical dereference as mentioned above?
Brad Eck
Sr. Software Engineer
Pelco
3500 Pelco Way
Clovis, CA 93612
Office - 800-289-9100
Email - [email protected] BLOCKED::mailto:[email protected]