Sha256: 8a8437329748509478b9dd7e3974815af0d2a07579ceabb6b75f9d9c20a523bc
Contents?: true
Size: 432 Bytes
Versions: 6
Compression:
Stored size: 432 Bytes
Contents
module Wafflemix class ContentSection < ActiveRecord::Base attr_accessible :content, :contentable_id, :contentable_type, :name belongs_to :contentable, :polymorphic => true def self.title self.name.downcase.parameterize end def self.content_for(name) part = where('lower(name) LIKE ?', "%#{name.downcase}%").first if part part.content else false end end end end
Version data entries
6 entries across 6 versions & 1 rubygems