Module: Enjoy::Faq::Models::Mongoid::Question

Extended by:
ActiveSupport::Concern
Includes:
HtmlField
Defined in:
lib/enjoy/faq/models/mongoid/question.rb

Instance Method Summary collapse

Instance Method Details

#author_name_outputObject



44
45
46
# File 'lib/enjoy/faq/models/mongoid/question.rb', line 44

def author_name_output
  self.author_name_text_after_editing.blank? ? self.author_name : self.author_name_text_after_editing
end

#categoryObject



36
37
38
# File 'lib/enjoy/faq/models/mongoid/question.rb', line 36

def category
  self.categories.enabled.sorted.first
end

#question_text_outputObject



40
41
42
# File 'lib/enjoy/faq/models/mongoid/question.rb', line 40

def question_text_output
  self.question_text_after_editing.blank? ? self.question_text : self.question_text_after_editing
end