Commit 85a233b30689da91d56ffe73f5cce3fa52dd7fcf
1 parent
bf913ea9
Exists in
master
and in
28 other branches
ActionItem85: fixing bug
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@780 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
8 additions
and
7 deletions
Show diff stats
app/controllers/application.rb
| @@ -39,7 +39,7 @@ class ApplicationController < ActionController::Base | @@ -39,7 +39,7 @@ class ApplicationController < ActionController::Base | ||
| 39 | 39 | ||
| 40 | def load_profile | 40 | def load_profile |
| 41 | @profile = Profile.find_by_identifier(params[:profile]) | 41 | @profile = Profile.find_by_identifier(params[:profile]) |
| 42 | - raise "The profile must be loaded %s" % params[:profile] if @profile.nil? | 42 | + raise "The profile must be loaded %s" % params.inspect if @profile.nil? |
| 43 | end | 43 | end |
| 44 | 44 | ||
| 45 | def self.acts_as_environment_admin_controller | 45 | def self.acts_as_environment_admin_controller |
config/routes.rb
| @@ -18,6 +18,13 @@ ActionController::Routing::Routes.draw do |map| | @@ -18,6 +18,13 @@ ActionController::Routing::Routes.draw do |map| | ||
| 18 | # documentation browser | 18 | # documentation browser |
| 19 | map.connect 'doc', :controller => 'doc' | 19 | map.connect 'doc', :controller => 'doc' |
| 20 | 20 | ||
| 21 | + ###################################################### | ||
| 22 | + ## Controllers that are used by environment admin | ||
| 23 | + ###################################################### | ||
| 24 | + # administrative tasks for a environment | ||
| 25 | + map.admin 'admin', :controller => 'admin_panel' | ||
| 26 | + map.admin 'admin/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('environment_admin') | ||
| 27 | + | ||
| 21 | # user account controller | 28 | # user account controller |
| 22 | map.connect 'account/new_password/:code', :controller => 'account', :action => 'new_password' | 29 | map.connect 'account/new_password/:code', :controller => 'account', :action => 'new_password' |
| 23 | 30 | ||
| @@ -37,12 +44,6 @@ ActionController::Routing::Routes.draw do |map| | @@ -37,12 +44,6 @@ ActionController::Routing::Routes.draw do |map| | ||
| 37 | map.myprofile 'myprofile/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('profile_admin') | 44 | map.myprofile 'myprofile/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('profile_admin') |
| 38 | # content administration | 45 | # content administration |
| 39 | 46 | ||
| 40 | - ###################################################### | ||
| 41 | - ## Controllers that are used by environment admin | ||
| 42 | - ###################################################### | ||
| 43 | - # administrative tasks for a environment | ||
| 44 | - map.admin 'admin', :controller => 'admin_panel' | ||
| 45 | - map.admin 'admin/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_in_directory('environment_admin') | ||
| 46 | 47 | ||
| 47 | ###################################################### | 48 | ###################################################### |
| 48 | ## Controllers that are used by system admin | 49 | ## Controllers that are used by system admin |