adjust tag and sort
This commit is contained in:
1 parent
6b0a6a1fc8
commit
d33b0fe5a7
13 files changed
+106
-282
No files matched your search
@@ -1,8 +1,9 @@
|
||||
class AskQuestion
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include ActiveModel::Validations
|
||||
# include ActiveModel::Validations
|
||||
include OrbitCategory::Categorizable
|
||||
include OrbitTag::Taggable
|
||||
|
||||
# 欄位
|
||||
field :name, type: String
|
||||
@@ -15,11 +16,11 @@ class AskQuestion
|
||||
|
||||
field :reply, type: String
|
||||
field :comment, type: String
|
||||
field :status, type: String, default: "is_hot" #預設待處理
|
||||
field :situation, type: String, default: "is_waiting" #預設待處理
|
||||
field :send_email, type: Boolean, default: false
|
||||
field :email_id
|
||||
|
||||
validates_presence_of :name, :identity, :mail, :title, :content
|
||||
# validates_presence_of :name, :identity, :mail, :title, :content
|
||||
|
||||
def email
|
||||
mail = Email.find(self.email_id) rescue nil
|
||||
|
||||
Reference in new issue
Block a user