Commit 93c6a41f36472cd23f2b7fc68938f904cfbec063
1 parent
32ab46c6
Exists in
master
and in
28 other branches
ActionItem65: creating base controllers and making the ones in the folders inherit from them
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@489 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
18 changed files
with
90 additions
and
10 deletions
Show diff stats
app/controllers/environment_admin/admin_panel_controller.rb
app/controllers/environment_admin/edit_template_controller.rb
app/controllers/environment_admin/features_controller.rb
app/controllers/environment_admin/manage_tags_controller.rb
| 1 | 1 | # Manage tags stored by the acts-as_taggable_on_steroids plugin by providing an interface to create, destroy, update and list them |
| 2 | -class ManageTagsController < ApplicationController | |
| 2 | +class ManageTagsController < EnvironmentAdminController | |
| 3 | 3 | |
| 4 | 4 | # Index redirects to list action without modifing the url |
| 5 | 5 | def index | ... | ... |
app/controllers/environment_admin/role_controller.rb
app/controllers/profile_admin/enterprise_controller.rb
app/controllers/profile_admin/profile_editor_controller.rb
app/controllers/public/account_controller.rb
app/controllers/public/content_viewer_controller.rb
app/controllers/public/home_controller.rb
| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | +require File.dirname(__FILE__) + '/../test_helper' | |
| 2 | +require 'environment_admin_controller' | |
| 3 | + | |
| 4 | +# Re-raise errors caught by the controller. | |
| 5 | +class EnvironmentAdminController; def rescue_action(e) raise e end; end | |
| 6 | + | |
| 7 | +class EnvironmentAdminControllerTest < Test::Unit::TestCase | |
| 8 | + def setup | |
| 9 | + @controller = EnvironmentAdminController.new | |
| 10 | + @request = ActionController::TestRequest.new | |
| 11 | + @response = ActionController::TestResponse.new | |
| 12 | + end | |
| 13 | + | |
| 14 | + # Replace this with your real tests. | |
| 15 | + def test_truth | |
| 16 | + assert true | |
| 17 | + end | |
| 18 | +end | ... | ... |
| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | +require File.dirname(__FILE__) + '/../test_helper' | |
| 2 | +require 'profile_admin_controller' | |
| 3 | + | |
| 4 | +# Re-raise errors caught by the controller. | |
| 5 | +class ProfileAdminController; def rescue_action(e) raise e end; end | |
| 6 | + | |
| 7 | +class ProfileAdminControllerTest < Test::Unit::TestCase | |
| 8 | + def setup | |
| 9 | + @controller = ProfileAdminController.new | |
| 10 | + @request = ActionController::TestRequest.new | |
| 11 | + @response = ActionController::TestResponse.new | |
| 12 | + end | |
| 13 | + | |
| 14 | + # Replace this with your real tests. | |
| 15 | + def test_truth | |
| 16 | + assert true | |
| 17 | + end | |
| 18 | +end | ... | ... |
| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | +require File.dirname(__FILE__) + '/../test_helper' | |
| 2 | +require 'public_controller' | |
| 3 | + | |
| 4 | +# Re-raise errors caught by the controller. | |
| 5 | +class PublicController; def rescue_action(e) raise e end; end | |
| 6 | + | |
| 7 | +class PublicControllerTest < Test::Unit::TestCase | |
| 8 | + def setup | |
| 9 | + @controller = PublicController.new | |
| 10 | + @request = ActionController::TestRequest.new | |
| 11 | + @response = ActionController::TestResponse.new | |
| 12 | + end | |
| 13 | + | |
| 14 | + # Replace this with your real tests. | |
| 15 | + def test_truth | |
| 16 | + assert true | |
| 17 | + end | |
| 18 | +end | ... | ... |
| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | +require File.dirname(__FILE__) + '/../test_helper' | |
| 2 | +require 'system_admin_controller' | |
| 3 | + | |
| 4 | +# Re-raise errors caught by the controller. | |
| 5 | +class SystemAdminController; def rescue_action(e) raise e end; end | |
| 6 | + | |
| 7 | +class SystemAdminControllerTest < Test::Unit::TestCase | |
| 8 | + def setup | |
| 9 | + @controller = SystemAdminController.new | |
| 10 | + @request = ActionController::TestRequest.new | |
| 11 | + @response = ActionController::TestResponse.new | |
| 12 | + end | |
| 13 | + | |
| 14 | + # Replace this with your real tests. | |
| 15 | + def test_truth | |
| 16 | + assert true | |
| 17 | + end | |
| 18 | +end | ... | ... |