Sha256: 7c3890de7a58b5215be52efaaed721c99805a9b302a48d481adf55d202b030ac
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
module Enjoy::Faq module Models module Question extend ActiveSupport::Concern include Enjoy::Model include Enjoy::Enableable if Enjoy::Faq.config.seo_support include Enjoy::Seo::Seoable include Enjoy::Seo::SitemapDataField end include ManualSlug include Enjoy::Faq.orm_specific('Question') included do manual_slug :full_name if Enjoy::Faq.config.simple_captcha_support include SimpleCaptcha::ModelHelpers apply_simple_captcha message: Enjoy::Faq.configuration.captcha_error_message end validates_email_format_of :author_email if Enjoy::Faq.config.author_name_required validates_presence_of :author_name end validates_presence_of :question_text, :author_email end def name "#{self.question_text_output} (#{self.author_name_output})" end def full_name "#{self.author_name_output}: \"#{self.question_text_output}\"" end def category_class Enjoy::Faq::Category end end end end
Version data entries
4 entries across 4 versions & 1 rubygems