I have created rails application using ajax scaffold. It is easy for CRUD operation. If I use independent table its working perfectly. I have used two tables, which is referring another table. I need to show the parent table value in child table view.
For example:
User table: id,no,name,mark s
Dept table: id,userid,dept name, dept no
In 'Dept' table view ,I need to show the username . It is showing the id of the 'User' table.
Normally we use Dept.User.name. How to do this in ajax scaffolding?
Note:
I have used 'has_many,belon gs_to' relationship class.
For example:
User table: id,no,name,mark s
Dept table: id,userid,dept name, dept no
In 'Dept' table view ,I need to show the username . It is showing the id of the 'User' table.
Normally we use Dept.User.name. How to do this in ajax scaffolding?
Note:
I have used 'has_many,belon gs_to' relationship class.