From 54e6099a636bffbd49b95839a2826d2b7aed76d8 Mon Sep 17 00:00:00 2001 From: Bryan Larsen Date: Fri, 18 Nov 2011 11:18:17 -0500 Subject: [PATCH] [#981] potential fix to one of many problems with Hobo running in non-root deployments. --- hobo/lib/hobo/helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hobo/lib/hobo/helper.rb b/hobo/lib/hobo/helper.rb index 40790e6f5..c6ca2c0c8 100644 --- a/hobo/lib/hobo/helper.rb +++ b/hobo/lib/hobo/helper.rb @@ -127,7 +127,11 @@ def base_url_for(object, subsite, action) def recognize_page_path - Rails.application.routes.recognize_path(params[:page_path]||request.fullpath) + if params[:page_path] + Rails.application.routes.recognize_path(params[:page_path]) + else + params + end end def url_for_page_path(options={})