radiant-children_config-extension 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -9,7 +9,7 @@ Let's say you want all pages under "Events" to have the page parts "location", "
9
9
  Simply add a "children_config" page part to the "Events" page. In the content of that page part, put:
10
10
 
11
11
  ---
12
- - parts
12
+ - parts:
13
13
  - name: location
14
14
  filter: none
15
15
  - name: description
@@ -20,10 +20,10 @@ Simply add a "children_config" page part to the "Events" page. In the content of
20
20
  If you are using the [page_parts extension](https://github.com/digitalpulp/radiant-page_parts-extension), you can also pass the desired page part type like so:
21
21
 
22
22
  ---
23
- - parts
23
+ - parts:
24
24
  - name: location
25
25
  filter: none
26
- page_part_type: location_page_part
26
+ page_part_type: string_page_part
27
27
  - name: description
28
28
  filter: markdown
29
29
  - name: date
@@ -33,16 +33,16 @@ If you are using the [page_parts extension](https://github.com/digitalpulp/radia
33
33
  Another feature is to automatically create children for every new event page:
34
34
 
35
35
  ---
36
- - parts
36
+ - parts:
37
37
  - name: location
38
38
  filter: none
39
- page_part_type: location_page_part
39
+ page_part_type: string_page_part
40
40
  - name: description
41
41
  filter: markdown
42
42
  - name: date
43
43
  filter: none
44
44
  page_part_type: date_page_part
45
- - children
45
+ - children:
46
46
  - title: News
47
47
  status: published
48
48
  parts:
@@ -3,7 +3,7 @@ module ChildrenConfig::PageExtensions
3
3
  base.class_eval do
4
4
  after_save :create_children
5
5
 
6
- def self.new_with_page_parts(config = Radiant::Config, parts = String)
6
+ def self.new_with_children_config(config = Radiant::Config, parts = String)
7
7
  begin
8
8
  unless parts.empty?
9
9
  config = YAML::load(parts)
@@ -7,7 +7,7 @@ module ChildrenConfig::PagesControllerExtensions
7
7
  unless params[:page_id].blank?
8
8
  parent_page = Page.find(params[:page_id]);
9
9
  child_parts = parent_page.part("children_config").content
10
- self.model = model_class.new_with_page_parts(config, child_parts)
10
+ self.model = model_class.new_with_children_config(config, child_parts)
11
11
  else
12
12
  self.model = model_class.new_with_defaults(config)
13
13
  self.model.slug = '/'
@@ -1,3 +1,3 @@
1
1
  module RadiantChildrenConfigExtension
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-children_config-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Your Name
@@ -41,6 +41,7 @@ files:
41
41
  - lib/radiant-children_config-extension/version.rb
42
42
  - lib/radiant-children_config-extension.rb
43
43
  - lib/tasks/children_config_extension_tasks.rake
44
+ - radiant-children_config-extension-1.0.0.gem
44
45
  - radiant-children_config-extension.gemspec
45
46
  - Rakefile
46
47
  - README.md
@@ -51,7 +52,7 @@ files:
51
52
  homepage: http://yourwebsite.com/children_config
52
53
  licenses: []
53
54
 
54
- post_install_message: "\n Add this to your radiant project with:\n config.gem 'radiant-children_config-extension', :version => '~>1.0.0'\n "
55
+ post_install_message: "\n Add this to your radiant project with:\n config.gem 'radiant-children_config-extension', :version => '~>1.0.1'\n "
55
56
  rdoc_options: []
56
57
 
57
58
  require_paths: