Model associations
        Posted  
        
            by Kalyan M
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Kalyan M
        
        
        
        Published on 2010-04-14T17:49:00Z
        Indexed on 
            2010/04/14
            17:53 UTC
        
        
        Read the original article
        Hit count: 426
        
I have two models Library and Book. In my Library model, I have an array - book_ids. The primary key of Book model is ID.
How do I create a has_many :books relation in my library model?
This is a legacy database we are using with rails.
Thanks.
© Stack Overflow or respective owner