On 25 March 2011 16:01, Alexey M. <[email protected]> wrote: > Hello, can anyone simply tell me if what i want to do is ok to do with > Rails, or will there arise some serious obstacle? > If it is ok to do, then i will probably figure out a way ofter some > trial and error. > Any other suggestion will also be appreciated. > > I want to share the primary key among several tables, and then to also > use it as the foreign key for has_one associations.
Why do you want to use the same primary key value for multiple tables? Unless you have a really good reason for not following the rails conventions then it is best to stick to them. Your life will be much easier. Just set up the appropriate relationships between the models in the normal way. Colin -- 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.

