Sha256: f50a995e00df9fa00f2f9724456f5f965a02db330565351b11b1d8b7d38da8e1
Contents?: true
Size: 351 Bytes
Versions: 3
Compression:
Stored size: 351 Bytes
Contents
class ContentBlock < ActiveRecord::Base extend FriendlyId friendly_id :title, use: :slugged validates :title, :slug, uniqueness: true validates :title, presence: true validates :page_id, presence: true, on: :update belongs_to :page default_scope includes(:page).order('pages.title') def render self.content.html_safe end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
manifest-rails-0.0.4 | app/models/content_block.rb |
manifest-rails-0.0.3 | app/models/content_block.rb |
manifest-rails-0.0.2 | app/models/content_block.rb |