Commit 8b0a64db0856bff0ad5bd082e75d53b168533c38
1 parent
c032fe70
Exists in
master
and in
22 other branches
ActionItem16: moving along with #16
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@852 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
7 changed files
with
14 additions
and
10 deletions
Show diff stats
app/controllers/application.rb
@@ -40,11 +40,6 @@ class ApplicationController < ActionController::Base | @@ -40,11 +40,6 @@ class ApplicationController < ActionController::Base | ||
40 | end | 40 | end |
41 | end | 41 | end |
42 | 42 | ||
43 | - def load_profile | ||
44 | - @profile ||= Profile.find_by_identifier(params[:profile]) | ||
45 | - render_not_found(request.path) unless profile | ||
46 | - end | ||
47 | - | ||
48 | def render_not_found(path) | 43 | def render_not_found(path) |
49 | @path = path | 44 | @path = path |
50 | render :file => File.join(RAILS_ROOT, 'app', 'views', 'shared', 'not_found.rhtml'), :layout => 'not_found', :status => 404 | 45 | render :file => File.join(RAILS_ROOT, 'app', 'views', 'shared', 'not_found.rhtml'), :layout => 'not_found', :status => 404 |
app/controllers/profile_admin/cms_controller.rb
app/controllers/profile_admin/enterprise_editor_controller.rb
@@ -5,7 +5,7 @@ class EnterpriseEditorController < ProfileAdminController | @@ -5,7 +5,7 @@ class EnterpriseEditorController < ProfileAdminController | ||
5 | protect [:edit, :update], 'edit_profile', :profile | 5 | protect [:edit, :update], 'edit_profile', :profile |
6 | protect [:destroy], 'destroy_profile', :profile | 6 | protect [:destroy], 'destroy_profile', :profile |
7 | 7 | ||
8 | - needs_profile | 8 | + |
9 | 9 | ||
10 | # Show details about an enterprise | 10 | # Show details about an enterprise |
11 | def index | 11 | def index |
app/controllers/profile_admin/enterprise_validation_controller.rb
app/controllers/profile_admin/membership_editor_controller.rb
@@ -2,7 +2,7 @@ class MembershipEditorController < ProfileAdminController | @@ -2,7 +2,7 @@ class MembershipEditorController < ProfileAdminController | ||
2 | 2 | ||
3 | before_filter :login_required | 3 | before_filter :login_required |
4 | 4 | ||
5 | - needs_profile | 5 | + |
6 | 6 | ||
7 | protect [:index, :new_enterprise, :create_enterprise ], 'edit_profile', :profile | 7 | protect [:index, :new_enterprise, :create_enterprise ], 'edit_profile', :profile |
8 | 8 |
app/controllers/profile_admin/profile_editor_controller.rb
1 | class ProfileEditorController < ProfileAdminController | 1 | class ProfileEditorController < ProfileAdminController |
2 | -# protect [:index, :edit], 'edit_profile', :profile | 2 | + |
3 | + #protect [:index, :edit], 'edit_profile', :profile | ||
4 | + | ||
3 | helper :profile | 5 | helper :profile |
4 | 6 | ||
5 | - needs_profile | 7 | + |
6 | 8 | ||
7 | design_editor :holder => 'profile', :autosave => true, :block_types => :block_types | 9 | design_editor :holder => 'profile', :autosave => true, :block_types => :block_types |
8 | 10 |
app/controllers/profile_admin_controller.rb
1 | class ProfileAdminController < ApplicationController | 1 | class ProfileAdminController < ApplicationController |
2 | 2 | ||
3 | + needs_profile | ||
4 | + | ||
3 | # declares that the controller needs an specific type of profile. Example: | 5 | # declares that the controller needs an specific type of profile. Example: |
4 | # | 6 | # |
5 | # class PersonDetailControlles < ProfileAdminController | 7 | # class PersonDetailControlles < ProfileAdminController |