diff --git a/app/controllers/admin/asks_controller.rb b/app/controllers/admin/asks_controller.rb index 3ef4fa9..34ea5b9 100644 --- a/app/controllers/admin/asks_controller.rb +++ b/app/controllers/admin/asks_controller.rb @@ -408,7 +408,9 @@ class Admin::AsksController < OrbitAdminController email_er.email_id = email.id email_er.save - @group_mail = email_er.mail + @group_mail = [] + @group_mail << email_er.mail + @group_mail = @group_mail + email_er.bcc_emails.split(",") @mail_sentdate = DateTime.now site = Site.first diff --git a/app/models/ask_question.rb b/app/models/ask_question.rb index 3f3f14a..ff121b3 100644 --- a/app/models/ask_question.rb +++ b/app/models/ask_question.rb @@ -20,6 +20,7 @@ class AskQuestion field :reply, type: String field :comment, type: String + field :bcc_emails, type: String field :situation, type: String, default: "is_email_not_confirmed" # 預設email未驗證 field :send_email, type: Integer, default: 0 field :email_id @@ -28,7 +29,7 @@ class AskQuestion field :agree_show, type: Boolean, default: false field :agree_usage, type: Boolean, default: false field :is_hidden, type: Boolean - + field :review_time, type: DateTime belongs_to :reviewer, class_name: "MemberProfile", foreign_key: :reviewer_id has_many :ask_status_histories @@ -109,7 +110,7 @@ class AskQuestion if changed? || @changed @new_history = AskStatusHistory.create( ask_question: self, - status: self.situation, + status: self.situation, comment: @release_comment, file: @release_file, user: @user diff --git a/app/views/admin/asks/_form.html.erb b/app/views/admin/asks/_form.html.erb index 3ddd517..dc18d1e 100644 --- a/app/views/admin/asks/_form.html.erb +++ b/app/views/admin/asks/_form.html.erb @@ -158,6 +158,12 @@ <%= f.text_area :reply, rows: 10, style: 'max-width: 500px; width: 100%;' %> +