Class: Wafflemix::ContentSection
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Wafflemix::ContentSection
- Defined in:
- app/models/wafflemix/content_section.rb
Class Method Summary collapse
Class Method Details
.content_for(name) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/models/wafflemix/content_section.rb', line 11 def self.content_for(name) part = where('lower(name) LIKE ?', "%#{name.downcase}%").first if part part.content else false end end |
.title ⇒ Object
7 8 9 |
# File 'app/models/wafflemix/content_section.rb', line 7 def self.title self.name.downcase.parameterize end |