From: Jacob Basham Date: 2007-11-07T16:38:17+09:00 Subject: Re: Show info from table wich is joined Did you setup the AR models? User has_many :education Education belongs_to :user On Nov 6, 2007, at 8:53 AM, Remco Swoany wrote: > Hi, > > <% @user.email %> > ...is working > > <% @user.educations do |education| %> >
  • <%= education.name%>
  • > ...is NOT working. > > This is because there is a join-table involved..below the mirgation > > class AddTableEducationsUsers < ActiveRecord::Migration > def self.up > create_table :educations_users do |t| > t.column :education_id, :integer > t.column :user_id, :integer > > end > add_index "educations_users", "education_id" > add_index "educations_users", "user_id" > > end > def self.down > drop_table :educations_users > end > end > > I want on the user-page the occupations of the user...any > suggestions?? > > remco > -- > Posted via http://www.ruby-forum.com/. >