Adjust send_email field to multiple options.

This commit is contained in:
rulingcom committed 2024-09-04 00:01:15 +08:00
1 parent 3caa63bb46
commit d2edc29945
6 files changed
+44 -5

No files matched your search

+5 -1
View File
@@ -20,8 +20,8 @@ class AskQuestion
field :reply, type: String
field :comment, type: String
field :send_email, type: Boolean, default: false
field :situation, type: String, default: "is_email_not_confirmed" # 預設email未驗證
field :send_email, type: Integer, default: 0
field :email_id
field :verify_email_id
field :custom_values, type: Hash, default: {}
@@ -75,5 +75,9 @@ class AskQuestion
def display_format_string(num, str_length)
format("%0#{str_length}d", num)
end
def send_email?
self.send_email == 1
end
end
end