Hi, Does anyone know where I can find a full step by step tutorial on Many to Many Relationships with Rails or can describe the steps in inserting data into the join tables, displaying the connections, etc.. - I don''t only need the model, but all the steps that you would use in the MVC architecture to make it work. I am a new to Rails and I cannot find a complete tutorial on all the steps needed to make this work probably. I have tried a number of different things, but a lot of the tutorials online are from 2 years ago and a lot has changed since then. What I am trying to do is a CRUD system that works with Many to Many relationships. Example: There will be 2 objects - books and authors authors has many books books has many authors (say more then 1 author wrote the book) I then want to display a list of books and one of the fields I will be pulling from the database is the authors associated with the books. Then the same with authors. I want to be able to insert, update, edit, delete from the ruby on rails application, not manually from the Mysql database. Thank you
On Sat, Sep 12, 2009 at 6:07 PM, MS999 <msefaradi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > Does anyone know where I can find a full step by step tutorial on Many > to Many Relationships with Rails or can describe the steps in > inserting data into the join tables, displaying the connections, etc..I always use an actual join model and :through. The Many-to-many section on this page explains how it works: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html -- Greg Donald http://destiney.com/
I have given the details @ http://www.ruby-forum.com/topic/191527 try and let me know <a href="http://www.craigslistcloned.com">Open Source Craigslist in Rails</a> -- Posted via http://www.ruby-forum.com/.
Hi Read these http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association http://guides.rubyonrails.org/association_basics.html#choosing-between-has-many-through-and-has-and-belongs-to-many Sijo -- Posted via http://www.ruby-forum.com/.