Class: Question
- Inherits:
-
Object
- Object
- Question
- Includes:
- MongoMapper::Document, MongoMapper::Serialize
- Defined in:
- lib/question_chain/models/question.rb
Class Method Summary collapse
-
.attributes_for_api ⇒ Object
Hooks.
Instance Method Summary collapse
Class Method Details
.attributes_for_api ⇒ Object
Hooks
26 27 28 |
# File 'lib/question_chain/models/question.rb', line 26 def self.attributes_for_api %w(id name description computation_id ui_groups label calculator_id) end |
Instance Method Details
#to_hash ⇒ Object
34 35 36 |
# File 'lib/question_chain/models/question.rb', line 34 def to_hash Hashie::Mash.new(attributes_for_api_resources) end |
#to_json ⇒ Object
30 31 32 |
# File 'lib/question_chain/models/question.rb', line 30 def to_json attributes_for_api_resource.to_json end |