Thanks for the help in advance, I am having some trouble with
belongs_to, and I caint seem to figure it out.
I have two tables, one called ‘pow_users’ and one is called ‘pow_site’
pow_users has a field called site that has the site ID for primary id in
the pow_site’ table.
the pow_site table setup as the Site class with the following:
class Site < ActiveRecord::Base
So in my orders class I have the following:
class Order < ActiveRecord::Base
:foreign_key => ‘site’
When I do for example <%= orders.site.name %> it works fine and shows
the site name… However if I try to save a form like with the variable
as order[site] i receive the following error: “Site expected, got
Thanks again! Let me know if you need more info to understand my mess.