radiant_helper 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/radiant_helper +1 -1
- data/lib/radiant_helper_page.rb +1 -0
- data/lib/tasks/rubyforge_config.yml +1 -1
- metadata +2 -2
data/bin/radiant_helper
CHANGED
@@ -61,7 +61,7 @@ end
|
|
61
61
|
|
62
62
|
And your routes.rb would have the following entry:
|
63
63
|
|
64
|
-
map.connect "cms
|
64
|
+
map.connect "cms/*slug", :controller => "cms", :action => "index"
|
65
65
|
|
66
66
|
The Radiant::Helper::Page.render method takes a Hash, which will mostly like be your params Hash, although it does not have to. What it DOES need to contain though is a :slug parameter which tells the Radiant::Helper::Page.render method which slug in the Radiant CMS it is going to try and access. Any other entries in the params Hash, with the exception of :action, :controller, and :slug, will be passed on as query string parameters to the Radiant slug you are trying to access.
|
67
67
|
|
data/lib/radiant_helper_page.rb
CHANGED
@@ -34,6 +34,7 @@ module Radiant
|
|
34
34
|
|
35
35
|
def render(params)
|
36
36
|
slug = params[:slug] || params["slug"]
|
37
|
+
slug = slug.join("/") if slug.is_a? Array
|
37
38
|
raise RuntimeError.new("You MUST define a slug parameter!") if slug.blank?
|
38
39
|
res = Radiant::Helper::Page.retrieve(slug, params)
|
39
40
|
if res.success?
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: radiant_helper
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2007-10-
|
6
|
+
version: 1.0.5
|
7
|
+
date: 2007-10-17 00:00:00 -04:00
|
8
8
|
summary: radiant_helper
|
9
9
|
require_paths:
|
10
10
|
- lib
|