Permalink
Browse files

Move rb_all_projects#server variables => rb_server_variables#index

  • Loading branch information...
Vanuan committed May 26, 2012
1 parent abefffb commit 94afaaa55e2fcba4b3aa73565bce48239b199cb1
@@ -11,9 +11,4 @@ def statistics
@projects.sort! {|a, b| a.scrum_statistics.score <=> b.scrum_statistics.score}
end
- def server_variables
- respond_to do |format|
- format.js { render :file => 'rb_server_variables/show.js.erb', :layout => false }
- end
- end
end
@@ -15,5 +15,5 @@
<%= javascript_include_tag 'jquery/jquery.jqplot/plugins/jqplot.enhancedLegendRenderer.min.js', :plugin => 'redmine_backlogs' %>
<%= javascript_include_tag 'jquery/jquery.cookie.js', :plugin => 'redmine_backlogs' %>
-<script type="text/javascript" src="<%= url_for(:controller => 'rb_all_projects', :action => 'server_variables') %>"></script>
+<script type="text/javascript" src="<%= url_for(:controller => 'rb_server_variables', :action => 'index') %>"></script>
<%= javascript_include_tag 'common.js', 'burndown.js', :plugin => 'redmine_backlogs' %>
View
@@ -20,7 +20,7 @@
rb.connect 'server_variables/project/:project_id.js', :controller => :rb_server_variables, :action => 'project'
rb.connect 'server_variables/sprint/:sprint_id.js', :controller => :rb_server_variables, :action => 'sprint'
- rb.connect 'server_variables.js', :controller => :rb_all_projects, :action => 'server_variables'
+ rb.connect 'server_variables.js', :controller => :rb_server_variables, :action => 'index'
rb.connect 'master_backlog/:project_id', :controller => :rb_master_backlogs, :action => 'show'
rb.connect 'master_backlog/:project_id/menu.json', :controller => :rb_master_backlogs, :action => 'menu', :format => 'json'
@@ -74,7 +74,7 @@
match 'server_variables/sprint/:sprint_id.js',
:to => 'rb_server_variables#sprint'
match 'server_variables.js',
- :to => 'rb_all_projects#server_variables'
+ :to => 'rb_server_variables#index'
match 'server_variables/project/:project_id.js',
:to => 'rb_server_variables#project'
View
@@ -18,8 +18,8 @@ Feature: Routes
Scenario: Server variables script
When I get the "rb/server_variables.js" page using format "js"
Then application should route me to:
- | controller | rb_all_projects |
- | action | server_variables |
+ | controller | rb_server_variables |
+ | action | index |
And the request should complete successfully
Scenario: Task create page
View
@@ -73,8 +73,7 @@
:rb_wikis => :show,
:rb_stories => [:index, :show],
:rb_queries => [:show, :impediments],
- :rb_server_variables => [:project, :sprint],
- :rb_all_projects => :server_variables,
+ :rb_server_variables => [:project, :sprint, :index],
:rb_burndown_charts => [:embedded, :show, :print],
:rb_updated_items => :show
}
@@ -84,8 +83,7 @@
:rb_sprints => [:index, :show, :download],
:rb_wikis => :show,
:rb_stories => [:index, :show],
- :rb_server_variables => [:project, :sprint],
- :rb_all_projects => :server_variables,
+ :rb_server_variables => [:project, :sprint, :index],
:rb_burndown_charts => [:embedded, :show, :print],
:rb_updated_items => :show
}
@@ -97,8 +95,7 @@
:rb_tasks => [:index, :show],
:rb_impediments => [:index, :show],
:rb_wikis => :show,
- :rb_server_variables => [:project, :sprint],
- :rb_all_projects => :server_variables,
+ :rb_server_variables => [:project, :sprint, :index],
:rb_hooks_render => [:view_issues_sidebar],
:rb_burndown_charts => [:embedded, :show, :print],
:rb_updated_items => :show

1 comment on commit 94afaaa

@retorquere

This comment has been minimized.

Show comment Hide comment
@retorquere

retorquere May 27, 2012

I'm fairly certain there was a page at some point that required server_variables without any project. rb_server_variables_controller inherits rb_application_controller, which raises an error if no project is present.

I'm fairly certain there was a page at some point that required server_variables without any project. rb_server_variables_controller inherits rb_application_controller, which raises an error if no project is present.

Please sign in to comment.