search for: createemails

Displaying 2 results from an estimated 2 matches for "createemails".

Did you mean: create_email
2012 Apr 05
0
Polymorphism, acts_as_relation gem and nested attributes
...acts_as :detail validates_presence_of :username, :password end Migration code: class CreateInfo < ActiveRecord::Migration def change create_table :details, :as_relation_superclass => true do |t| t.timestamps end end end class CreateEmails < ActiveRecord::Migration def change create_table :emails do |t| t.string :address t.string :address_type t.string :detail_id t.timestamps end end end class CreateUsers < ActiveRecord::Migration def change...
2012 Feb 14
4
What I'm doing wrong, has_and_belong_to_many
...ate :name end My GroupsMigrate class CreateGroups < ActiveRecord::Migration def change create_table :groups do |t| t.string "name" t.string "description" t.timestamps end end def down drop_table :groups end end My EmailsMigrate class CreateEmails < ActiveRecord::Migration def change create_table :emails do |t| t.string "name" t.string "email" t.string "sex", :default => "M", :limit => 1 t.timestamps end end def down drop_table :emails end end My E...