Starting to add email sending

This commit is contained in:
Matt Barringer 2013-01-14 08:49:49 +01:00
parent b801f0dc19
commit 900bcb16d5
16 changed files with 248 additions and 21 deletions

View file

@ -0,0 +1,21 @@
class CreateEmailTable < ActiveRecord::Migration
def up
create_table :email_settings do |t|
t.references :conference
t.boolean :send_on_registration, :default => true
t.boolean :send_on_accepted, :default => true
t.boolean :send_on_rejected, :default => true
t.boolean :send_on_confirmed_without_registration, :default => true
t.text :registration_email_template
t.text :accepted_email_template
t.text :rejected_email_template
t.text :confirmed_email_template
t.timestamps
end
end
def down
drop_table :email_settings
end
end

View file

@ -0,0 +1,8 @@
class AddSubjectsToEmailSettings < ActiveRecord::Migration
def change
add_column :email_settings, :registration_subject, :string
add_column :email_settings, :accepted_subject, :string
add_column :email_settings, :rejected_subject, :string
add_column :email_settings, :confirmed_without_registration_subject, :string
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130107114930) do
ActiveRecord::Schema.define(:version => 20130113132225) do
create_table "call_for_papers", :force => true do |t|
t.date "start_date", :null => false
@ -58,6 +58,24 @@ ActiveRecord::Schema.define(:version => 20130107114930) do
t.date "registration_end_date"
end
create_table "email_settings", :force => true do |t|
t.integer "conference_id"
t.boolean "send_on_registration", :default => true
t.boolean "send_on_accepted", :default => true
t.boolean "send_on_rejected", :default => true
t.boolean "send_on_confirmed_without_registration", :default => true
t.text "registration_email_template"
t.text "accepted_email_template"
t.text "rejected_email_template"
t.text "confirmed_email_template"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "registration_subject"
t.string "accepted_subject"
t.string "rejected_subject"
t.string "confirmed_without_registration_subject"
end
create_table "event_attachments", :force => true do |t|
t.integer "event_id"
t.string "title", :null => false