Class: Index
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Index
- Extended by:
- FriendlyId
- Includes:
- ActsAsPrioritizable
- Defined in:
- app/models/index.rb
Instance Method Summary collapse
Instance Method Details
#assets ⇒ Object
37 38 39 |
# File 'app/models/index.rb', line 37 def assets (texts + photos + videos + downloadables).sort_by{|a| a.priority || 99} end |
#default_name ⇒ Object
41 42 43 44 |
# File 'app/models/index.rb', line 41 def default_name self.name ||= (self.title ||= self.owner.name).tableize rescue nil self.title ||= self.name.titleize rescue nil end |