From 0dd497dee2519739c6c7790a93f74881f2ae63c8 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Wed, 23 Jan 2008 22:50:52 +0000 Subject: [PATCH] ActionItem154: removing unused code --- app/controllers/admin/features_controller.rb | 2 -- app/controllers/application.rb | 12 +----------- app/controllers/public/account_controller.rb | 12 ------------ 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/app/controllers/admin/features_controller.rb b/app/controllers/admin/features_controller.rb index 2756707..54cb27d 100644 --- a/app/controllers/admin/features_controller.rb +++ b/app/controllers/admin/features_controller.rb @@ -1,8 +1,6 @@ class FeaturesController < AdminController protect 'edit_environment_features', :environment - acts_as_environment_admin_controller - def index @features = Environment.available_features end diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 2b467f7..a0676a9 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -31,10 +31,6 @@ class ApplicationController < ActionController::Base before_filter :detect_stuff_by_domain attr_reader :environment - def self.acts_as_environment_admin_controller - before_filter :load_admin_controller - end - # declares that the given actions cannot be accessed by other HTTP # method besides POST. def self.post_only(actions, redirect = { :action => 'index'}) @@ -60,14 +56,8 @@ class ApplicationController < ActionController::Base render(:file => File.join(RAILS_ROOT, 'app', 'views', 'shared', 'not_found.rhtml'), :layout => 'not_found', :status => 404) && false end - def load_admin_controller - # TODO: check access control - end - def load_profile - @profile = Profile.find_by_identifier(params[:profile]) unless @profile -#raise "bli %s" % @profile.inspect -# @profile = Profile.find_by_identifier(params[:profile]) unless @profile + @profile = Profile.find_by_identifier(params[:profile]) render_not_found unless @profile end diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index 242ed61..14fc0c7 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -1,7 +1,5 @@ class AccountController < PublicController - before_filter :load_default_environment - # say something nice, you goof! something sweet. def index unless logged_in? @@ -131,16 +129,6 @@ class AccountController < PublicController protected - before_filter :load_profile_for_user - def load_profile_for_user - return unless logged_in? - @profile = current_user.person - end - - def load_default_environment - @environment = Environment.default - end - def go_to_user_initial_page redirect_back_or_default(:controller => "content_viewer", :profile => current_user.login, :action => 'view_page', :page => []) end -- libgit2 0.21.2