Sha256: 307d218fc5ea213f45ab82e3f2440912650c291bfcb414f3df32f3286c6273b5

Contents?: true

Size: 274 Bytes

Versions: 3

Compression:

Stored size: 274 Bytes

Contents

class Page < ActiveRecord::Base
  acts_as_publishable :live, :draft, :members_only, :public
  validates_presence_of :title, :body

  attr_accessible :title, :body, :published_as, :page_public

  def to_param
    id.to_s << "-" << (title ? title.parameterize : '')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
community_engine-2.3.2 app/models/page.rb
community_engine-2.3.1 app/models/page.rb
community_engine-2.3.0 app/models/page.rb