From 85a233b30689da91d56ffe73f5cce3fa52dd7fcf Mon Sep 17 00:00:00 2001 From: LeandroNunes Date: Sat, 20 Oct 2007 04:44:39 +0000 Subject: [PATCH] ActionItem85: fixing bug --- app/controllers/application.rb | 2 +- config/routes.rb | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 1ce44ad..a1ca5cd 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -39,7 +39,7 @@ class ApplicationController < ActionController::Base def load_profile @profile = Profile.find_by_identifier(params[:profile]) - raise "The profile must be loaded %s" % params[:profile] if @profile.nil? + raise "The profile must be loaded %s" % params.inspect if @profile.nil? end def self.acts_as_environment_admin_controller diff --git a/config/routes.rb b/config/routes.rb index 4a4f659..6a1c52f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,6 +18,13 @@ ActionController::Routing::Routes.draw do |map| # documentation browser map.connect 'doc', :controller => 'doc' + ###################################################### + ## Controllers that are used by environment admin + ###################################################### + # administrative tasks for a environment + map.admin 'admin', :controller => 'admin_panel' + map.admin 'admin/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('environment_admin') + # user account controller map.connect 'account/new_password/:code', :controller => 'account', :action => 'new_password' @@ -37,12 +44,6 @@ ActionController::Routing::Routes.draw do |map| map.myprofile 'myprofile/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('profile_admin') # content administration - ###################################################### - ## Controllers that are used by environment admin - ###################################################### - # administrative tasks for a environment - map.admin 'admin', :controller => 'admin_panel' - map.admin 'admin/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('environment_admin') ###################################################### ## Controllers that are used by system admin -- libgit2 0.21.2