search for: acroom

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

Did you mean: croom
2006 Jul 13
1
model navigation problem with foreign key
...execute "alter table line_msgs add constraint fk_line_msg_rooms foreign key (room_id) references ac_rooms(id)" end and i added the belongs_to :ac_room in line_msg.rb and has_many: :line_msgs to ac_room.rb in the model, but when i did room = AcRoom.find(...) <%= render(:partial => "line_msg", :collection => room.line_msgs) %> but i get error Mysql::Error: #42S22Unknown column ''line_msgs.ac_room_id'' in ''where clause'': SELECT * FROM line_msgs WHERE (line_msgs.ac_room_id = 6) my quest...