Commit 0dd497dee2519739c6c7790a93f74881f2ae63c8
1 parent
c95d491c
Exists in
master
and in
29 other branches
ActionItem154: removing unused code
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1253 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
1 additions
and
25 deletions
Show diff stats
app/controllers/admin/features_controller.rb
app/controllers/application.rb
... | ... | @@ -31,10 +31,6 @@ class ApplicationController < ActionController::Base |
31 | 31 | before_filter :detect_stuff_by_domain |
32 | 32 | attr_reader :environment |
33 | 33 | |
34 | - def self.acts_as_environment_admin_controller | |
35 | - before_filter :load_admin_controller | |
36 | - end | |
37 | - | |
38 | 34 | # declares that the given <tt>actions</tt> cannot be accessed by other HTTP |
39 | 35 | # method besides POST. |
40 | 36 | def self.post_only(actions, redirect = { :action => 'index'}) |
... | ... | @@ -60,14 +56,8 @@ class ApplicationController < ActionController::Base |
60 | 56 | render(:file => File.join(RAILS_ROOT, 'app', 'views', 'shared', 'not_found.rhtml'), :layout => 'not_found', :status => 404) && false |
61 | 57 | end |
62 | 58 | |
63 | - def load_admin_controller | |
64 | - # TODO: check access control | |
65 | - end | |
66 | - | |
67 | 59 | def load_profile |
68 | - @profile = Profile.find_by_identifier(params[:profile]) unless @profile | |
69 | -#raise "bli %s" % @profile.inspect | |
70 | -# @profile = Profile.find_by_identifier(params[:profile]) unless @profile | |
60 | + @profile = Profile.find_by_identifier(params[:profile]) | |
71 | 61 | render_not_found unless @profile |
72 | 62 | end |
73 | 63 | ... | ... |
app/controllers/public/account_controller.rb
1 | 1 | class AccountController < PublicController |
2 | 2 | |
3 | - before_filter :load_default_environment | |
4 | - | |
5 | 3 | # say something nice, you goof! something sweet. |
6 | 4 | def index |
7 | 5 | unless logged_in? |
... | ... | @@ -131,16 +129,6 @@ class AccountController < PublicController |
131 | 129 | |
132 | 130 | protected |
133 | 131 | |
134 | - before_filter :load_profile_for_user | |
135 | - def load_profile_for_user | |
136 | - return unless logged_in? | |
137 | - @profile = current_user.person | |
138 | - end | |
139 | - | |
140 | - def load_default_environment | |
141 | - @environment = Environment.default | |
142 | - end | |
143 | - | |
144 | 132 | def go_to_user_initial_page |
145 | 133 | redirect_back_or_default(:controller => "content_viewer", :profile => current_user.login, :action => 'view_page', :page => []) |
146 | 134 | end | ... | ... |