[Rails] Active Record Relations and Nesting

2010-12-23 Thread Devin M
Hello, I am looking to create a rails app that will model and display related nodes. I am just beginning to dive into active record and I was wondering if the following pesudo code would work? class NodeLink < ActiveRecord::Base belongs_to :node # foreign key - node_id (recorded as primary_nod

Re: [Rails] Active Record relations

2010-03-26 Thread Lasse Bunk
Hi Rajkumar, This is pretty basic Rails – it might be a good idea to study up on the Ruby on Rails guides and the Agile Web Development with Railsbook. I hope this is okay for you. /

[Rails] Active Record relations

2010-03-25 Thread Rajkumar Surabhi
HI all in my application , i have 2 tables subjects and teachers. the relation is one to many. i have to display the subjects first and when i click on the subjects i have to display the teachers. and i have to add the new teacher to the teachers table by selecting the subject. how to do this -