Displaying 1 result from an estimated 1 matches for "ac_room_id".
2006 Jul 13
1
model navigation problem with foreign key
...ed 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 question is why rails make it into line_msgs.ac_room_id but not
line_msgs.room_id, is there some stupid things i did, thanks.
Excuse me for my poor english
--
Posted via http://www.rub...