Sha256: f55c24945dfce9691e69faa820dcc29b28b8918aef2573b6255a8474d195fd00

Contents?: true

Size: 637 Bytes

Versions: 7

Compression:

Stored size: 637 Bytes

Contents

= PageParts

Enable page parts in your model

== Install

  gem "page_parts"
  
  rake page_parts_engine:install:migrations

== Usage

  class Category < ActiveRecord::Base
    include PageParts::ActiveRecordExtension
    
    validates_presence_of :title
    
    page_parts :content, :sidebar
  end

  @category = Category.new
  @category.content = "Some text"
  @category.sidebar = "Sidebar text"
  @category.save
  
With suffixes:

  page_parts :main, :left, :sidebar, :suffix => [:ru, :en, :uk]
  
Generates main_ru, main_en, main_uk, left_ru ...

== Test

  rake test

Copyright (c) 2011 Aimbulance, released under the MIT license

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/page_parts-0.0.3/README.rdoc
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/page_parts-0.0.3/README.rdoc
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/page_parts-0.0.3/README.rdoc
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/page_parts-0.0.3/README.rdoc
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/page_parts-0.0.3/README.rdoc
page_parts-0.0.3 README.rdoc
page_parts-0.0.2 README.rdoc