Class: Spina::Parts::BlockCollection
- Inherits:
-
Base
- Object
- Base
- Spina::Parts::BlockCollection
- Includes:
- BlockFilterable
- 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
Methods included from BlockFilterable
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
10 11 12 |
# File 'app/models/spina/parts/block_collection.rb', line 10 def @options end |
Instance Method Details
#block_ids=(value) ⇒ Object
Defense: strip nils, zeros, and blanks that may sneak in from form submissions
13 14 15 |
# File 'app/models/spina/parts/block_collection.rb', line 13 def block_ids=(value) super(Array(value).reject(&:blank?).map(&:to_i).reject(&:zero?).uniq) end |