page_parts 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,44 +0,0 @@
1
- = PageParts
2
-
3
- Enable page parts in your model
4
-
5
- == Install
6
-
7
- gem "page_parts"
8
-
9
- ActiveRecord:
10
-
11
- require 'page_parts/orm/active_record'
12
-
13
- rake page_parts_engine:install:migrations
14
-
15
- Mongoid:
16
-
17
- require 'page_parts/orm/mongoid'
18
-
19
- == Usage
20
-
21
- class Category < ActiveRecord::Base
22
- include PageParts::Extension
23
-
24
- validates_presence_of :title
25
-
26
- page_parts :content, :sidebar
27
- end
28
-
29
- @category = Category.new
30
- @category.content = "Some text"
31
- @category.sidebar = "Sidebar text"
32
- @category.save
33
-
34
- With suffixes:
35
-
36
- page_parts :main, :left, :sidebar, :suffix => [:ru, :en, :uk]
37
-
38
- Generates main_ru, main_en, main_uk, left_ru ...
39
-
40
- == Test
41
-
42
- rake test
43
-
44
- Copyright (c) 2012 Fodojo, released under the MIT license