Class: BcmsQuestion
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BcmsQuestion
- Defined in:
- app/models/bcms_question.rb
Constant Summary collapse
- EMAIL_PATTERN =
Pattern used to find real emails
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
Class Method Summary collapse
-
.display_name ⇒ Object
display_name is used in the admin secton of the cms to give our content block a readable name.
Instance Method Summary collapse
-
#before_create ⇒ Object
When the question is saved make sure it is also published does not make sens to publish a question right?.
Class Method Details
.display_name ⇒ Object
display_name is used in the admin secton of the cms to give our content block a readable name
13 14 15 |
# File 'app/models/bcms_question.rb', line 13 def self.display_name "Submitted Questions" end |
Instance Method Details
#before_create ⇒ Object
When the question is saved make sure it is also published does not make sens to publish a question right?
19 20 21 |
# File 'app/models/bcms_question.rb', line 19 def before_create self.published = true end |