Rename 'mail' model to 'email' in order to prevent 'Mail is not a module' error (which only shows in production).
This commit is contained in:
parent
0b963f7105
commit
2fb31549a8
7 changed files with 30 additions and 7 deletions
23
db/migrate/20110515190518_create_emails.rb
Normal file
23
db/migrate/20110515190518_create_emails.rb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class CreateEmails < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :emails do |t|
|
||||
t.string :desc
|
||||
t.string :address
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
# we drop the 'mails' table as this is basically a renaming (without a need to migrate anything, yet)
|
||||
drop_table :mails
|
||||
end
|
||||
|
||||
def self.down
|
||||
create_table :mails do |t|
|
||||
t.string :desc
|
||||
t.string :address
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
drop_table :emails
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110514213956) do
|
||||
ActiveRecord::Schema.define(:version => 20110515190518) do
|
||||
|
||||
create_table "contacts", :force => true do |t|
|
||||
t.string "firstname"
|
||||
|
|
@ -24,7 +24,7 @@ ActiveRecord::Schema.define(:version => 20110514213956) do
|
|||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "mails", :force => true do |t|
|
||||
create_table "emails", :force => true do |t|
|
||||
t.string "desc"
|
||||
t.string "address"
|
||||
t.datetime "created_at"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue