Sha256: 62a742d84ceb7970ae309bfe71806060084be106e687bb6aae21da064b259d20
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 Bytes
Contents
module Slightcms class Part < ActiveRecord::Base # Change default table name set_table_name "slightcms_page_parts" # Associations belongs_to :page, :class_name => "Slightcms::Page" # Validations validates_presence_of :name validates_uniqueness_of :name, :scope => :page_id validates_presence_of :content protected # Render the part's content def render_content RedCloth.new(self.content).to_html end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slightcms-0.0.11 | lib/app/models/part.rb |