Class: Spina::Parts::BlockCollection
- Inherits:
-
Base
- Object
- Base
- Spina::Parts::BlockCollection
- Defined in:
- app/models/spina/parts/block_collection.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#block_ids=(value) ⇒ Object
Defense: strip nils, zeros, and blanks that may sneak in from form submissions.
- #content ⇒ Object
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'app/models/spina/parts/block_collection.rb', line 8 def @options end |
Instance Method Details
#block_ids=(value) ⇒ Object
Defense: strip nils, zeros, and blanks that may sneak in from form submissions
11 12 13 |
# File 'app/models/spina/parts/block_collection.rb', line 11 def block_ids=(value) super(Array(value).reject(&:blank?).map(&:to_i).reject(&:zero?).uniq) end |