Hallelujah! You are a lifesaver Bill - you got me almost all the way 
home. At least, now it is giving me an error message that is actually 
useful in figuring out what the problem is:

ActiveRecord::StatementInvalid: Mysql::Error: #42S22Unknown column 
'module_user_
map.user_id' in 'where clause': SELECT `module`.* FROM `module`    INNER 
JOIN mo
dule_user_map ON module.id = module_user_map.project_module_id    WHERE 
((`modul
e_user_map`.user_id = 2))

So, after adding a few :foreign_key declarations like this:

class ModuleUserMap < ActiveRecord::Base
  set_table_name "module_user_map"
  belongs_to :user, :foreign_key => "user"
  belongs_to :project_module, :foreign_key => "module"
end

we're good. Thank you so much! It would be great if this gave better 
error messages.

<>< gary

Bill Walton wrote:
> I think if you change the class name to singular (and the file name) 
> you'll be good to go.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to