Module: Spina::ImageCollectable
- Extended by:
- ActiveSupport::Concern
- Included in:
- ImageCollection, StructurePart
- Defined in:
- app/models/concerns/spina/image_collectable.rb
Instance Method Summary collapse
Instance Method Details
#image_positions=(positions) ⇒ Object
15 16 17 18 19 20 |
# File 'app/models/concerns/spina/image_collectable.rb', line 15 def image_positions=(positions) positions = positions.split(",") self.image_collections_images.each do |image| image.position = positions.index(image.image.try(:id).try(:to_s)) end end |
#image_tokens=(ids) ⇒ Object
11 12 13 |
# File 'app/models/concerns/spina/image_collectable.rb', line 11 def image_tokens=(ids) self.image_ids = ids.split(",") end |