search for: accountemployeerel

Displaying 2 results from an estimated 2 matches for "accountemployeerel".

2007 Feb 15
0
Can I use an array with fields_for ?
...which is inside a form_for) does not work: <% for r in @rs %> <% fields_for r do |f| %> Employee: <%= f.select (:employee_id, [''alan'', ''bob''] %><br/> <% end %> <% end %> I get the error ''@#<AccountEmployeeRelation:0xb7628038>'' is not allowed as an instance (each item in @rs is an AccountEmployeeRelation) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,...
2007 Feb 16
0
Please help...passing arrays between controller and view
I have tried to get this question answered before with no success. I''m getting desperate! Here is a simplified description of my problem... I have a many-to-many relationship between accounts and employees, with a model table in between called AccountEmployeeRelations. There is other stuff in this table, but I don''t think that matters for now. In the controller I create and account and 3 relations (I plan on changing this after I get it working) def new @account = Account.new @relations = [] 3.times do @rs << Account...