[Rails] belongs_to :model validation with mandatory foreign keys and foreign key at DB layer

2011-11-11 Thread Onur Özgür ÖZKAN
Hi Folks, *First Question* I want to learn that there is a native way make building normal and mandatory belongs_to associations. Let give a simple example, I have two models, first one is Tenant, second is User. User belongs to Tenant which mean there is a User.tenant_id. I can create, save or

Re: [Rails] belongs_to :model validation with mandatory foreign keys and foreign key at DB layer

2011-11-11 Thread Colin Law
2011/11/11 Onur Özgür ÖZKAN onur.ozgur.oz...@lab2023.com: Hi Folks, First Question I want to learn that there is a native way make building normal and mandatory belongs_to associations. Let give a simple example, I have two models, first one is Tenant, second is User. User belongs to Tenant