Class: Spina::PhotoCollection
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Spina::PhotoCollection
- Defined in:
- app/models/spina/photo_collection.rb
Instance Attribute Summary collapse
-
#photo_positions ⇒ Object
Returns the value of attribute photo_positions.
-
#photo_tokens ⇒ Object
Returns the value of attribute photo_tokens.
Instance Method Summary collapse
Instance Attribute Details
#photo_positions ⇒ Object
Returns the value of attribute photo_positions.
8 9 10 |
# File 'app/models/spina/photo_collection.rb', line 8 def photo_positions @photo_positions end |
#photo_tokens ⇒ Object
Returns the value of attribute photo_tokens.
8 9 10 |
# File 'app/models/spina/photo_collection.rb', line 8 def photo_tokens @photo_tokens end |
Instance Method Details
#old_update_attributes ⇒ Object
23 |
# File 'app/models/spina/photo_collection.rb', line 23 alias_method :old_update_attributes, :update_attributes |
#update_attributes(attributes) ⇒ Object
24 25 26 27 |
# File 'app/models/spina/photo_collection.rb', line 24 def update_attributes(attributes) self.photos.clear if attributes.reject{|key,value| key == "id" }.blank? old_update_attributes(attributes) end |