search for: district_field

Displaying 1 result from an estimated 1 matches for "district_field".

Did you mean: district_fields
2006 Aug 14
1
What fields_for really for?
...sy! And I need this functionality in another few places. Obviously I dont want to put this rubbish into other models! I recently come across fields_for helper. So I commented out "unnecessary" code in the model, put these into view: ... <% fields_for :district, @suburb.district do |district_fields| %> <%= district_fields.select :region_id, regions %> <% end %> ... And, guess what, I still need these damn methods in my model! Why would I use fields_for then? I don''t know! QUESTION 1: How can I apply fields_for in my case, so I do not need to pollute my models? Or...