Rails has_one through a collection?

You can just make a function to return the owner.

You can just make a function to return the owner def owner compus. Where(:owner => true). First end In terms of database design, if you want to limit a company to one owner it would be a good idea to put an owner_id column in the company table.

Otherwise you have to enforce that their is exactly one owner at all times, and it will be more complicated.

On the User model or the Company model > – eMxyzptlk Jun 25 at 18:12 I am not 100% sure what you want to do with job_title, there is already a function to access it on the Compu model so you could do something like: company.compus. Each { |compu| compu. Job_title; compu.

User;} but not sure if that is what you are looking for – mike Jun 25 at 18:54.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions