R
Remco Swoany
Hi,
<% @user.email %>
...is working
<% @user.educations do |education| %>
<li><%= education.name%></li>
...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
<% @user.email %>
...is working
<% @user.educations do |education| %>
<li><%= education.name%></li>
...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