Class: TypeStation::Content
- Inherits:
-
Object
- Object
- TypeStation::Content
- Includes:
- Mongoid::Attributes::Dynamic, Mongoid::Document
- Defined in:
- app/models/type_station/content.rb
Constant Summary collapse
- TYPES =
[:text, :html, :image, :file, :select, :multiple_select]
Instance Method Summary collapse
-
#get ⇒ Object
INSTANT METHODS.
- #set(value) ⇒ Object
Instance Method Details
#get ⇒ Object
INSTANT METHODS
25 26 27 |
# File 'app/models/type_station/content.rb', line 25 def get self[self.type] end |
#set(value) ⇒ Object
29 30 31 |
# File 'app/models/type_station/content.rb', line 29 def set(value) self[self.type] = convert(value) end |