Class: Question
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Question
- Defined in:
- app/models/question.rb
Constant Summary collapse
- ANSWER_TYPES =
['string', 'text']
Instance Method Summary collapse
- #character_limit? ⇒ Boolean
-
#destroy ⇒ Object
override for ‘safe delete’.
Instance Method Details
#character_limit? ⇒ Boolean
19 20 21 |
# File 'app/models/question.rb', line 19 def character_limit? character_limit && character_limit > 0 end |
#destroy ⇒ Object
override for ‘safe delete’
24 25 26 |
# File 'app/models/question.rb', line 24 def destroy update_attribute(:deleted_at, Time.now) end |