Class: Refinery::Slideshow::Slideshow
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Refinery::Slideshow::Slideshow
- Defined in:
- app/models/refinery/slideshow/slideshow.rb
Instance Method Summary collapse
-
#title ⇒ Object
Needed for the dashboard’s activity list.
- #uid_not_blank_if_not_attached ⇒ Object
Instance Method Details
#title ⇒ Object
Needed for the dashboard’s activity list
19 20 21 |
# File 'app/models/refinery/slideshow/slideshow.rb', line 19 def title uid end |
#uid_not_blank_if_not_attached ⇒ Object
9 10 11 12 |
# File 'app/models/refinery/slideshow/slideshow.rb', line 9 def uid_not_blank_if_not_attached errors.add(:uid, :blank) if self.uid.blank? && self.attached.nil? errors.add(:uid, :taken) if self.attached.nil? && !self.class.where(uid: uid).detect{|s| s != self }.nil? end |