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 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/:slug", :controller => "cms", :action => "index"
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
 
@@ -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?
@@ -2,4 +2,4 @@
2
2
  gem_name: radiant_helper
3
3
  package: radiant_helper
4
4
  project: magrathea
5
- version: 1.0.4
5
+ version: 1.0.5
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.4
7
- date: 2007-10-16 00:00:00 -04:00
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