From 843dcef9f835b953e35cab226b918df75359048e Mon Sep 17 00:00:00 2001 From: manson Date: Tue, 24 Jun 2014 17:23:51 +0800 Subject: [PATCH] Update default Email send date --- app/controllers/admin/announcements_controller.rb | 2 ++ app/models/bulletin.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/announcements_controller.rb b/app/controllers/admin/announcements_controller.rb index 98f14f5..a1f3c36 100644 --- a/app/controllers/admin/announcements_controller.rb +++ b/app/controllers/admin/announcements_controller.rb @@ -27,6 +27,7 @@ class Admin::AnnouncementsController < OrbitAdminController @categories = @module_app.categories.enabled @statuses = [] @bulletin = Bulletin.new + @bulletin.email_sentdate = Time.now end def create @@ -42,6 +43,7 @@ class Admin::AnnouncementsController < OrbitAdminController @tags =@module_app.tags @categories = @module_app.categories.enabled @statuses = [] + @bulletin.email_sentdate = Time.now if @bulletin.email_sent == false end def update diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index f1e5e82..72562bd 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -22,7 +22,7 @@ class Bulletin field :email_id field :email_sent, :type => Boolean, :default => false - field :email_sentdate , :type => DateTime, :default => Time.now+1.day + field :email_sentdate , :type => DateTime field :email_member_ids field :other_mailaddress