Displaying 1 result from an estimated 1 matches for "emails_group".
Did you mean:
emails_groups
2012 Feb 14
4
What I'm doing wrong, has_and_belong_to_many
...;
t.string "email"
t.string "sex", :default => "M", :limit => 1
t.timestamps
end
end
def down
drop_table :emails
end
end
My EmailsGroupsMigrate
class CreateEmailsGroupsJoin < ActiveRecord::Migration
def up
create_table :emails_groups, :id => false do |t|
t.references :email
t.references :group
end
add_index :emails_groups, [ "email_id", "group_id" ]
end
def down
drop_table :emails_groups
end
end
Thank you.
--
Posted via http://www.ruby-forum.com/.
--
You received thi...