Use named routes in controllers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10981 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cf66561b1e
commit
0b96094680
|
@ -110,7 +110,7 @@ class AccountController < ApplicationController
|
|||
session[:auth_source_registration] = nil
|
||||
self.logged_user = @user
|
||||
flash[:notice] = l(:notice_account_activated)
|
||||
redirect_to :controller => 'my', :action => 'account'
|
||||
redirect_to my_account_path
|
||||
end
|
||||
else
|
||||
@user.login = params[:user][:login]
|
||||
|
@ -218,7 +218,7 @@ class AccountController < ApplicationController
|
|||
set_autologin_cookie(user)
|
||||
end
|
||||
call_hook(:controller_account_success_authentication_after, {:user => user })
|
||||
redirect_back_or_default :controller => 'my', :action => 'page'
|
||||
redirect_back_or_default my_page_path
|
||||
end
|
||||
|
||||
def set_autologin_cookie(user)
|
||||
|
@ -270,7 +270,7 @@ class AccountController < ApplicationController
|
|||
if user.save
|
||||
self.logged_user = user
|
||||
flash[:notice] = l(:notice_account_activated)
|
||||
redirect_to :controller => 'my', :action => 'account'
|
||||
redirect_to my_account_path
|
||||
else
|
||||
yield if block_given?
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ class AdminController < ApplicationController
|
|||
flash[:error] = l(:error_can_t_load_default_data, e.message)
|
||||
end
|
||||
end
|
||||
redirect_to :action => 'index'
|
||||
redirect_to admin_path
|
||||
end
|
||||
|
||||
def test_email
|
||||
|
@ -68,7 +68,7 @@ class AdminController < ApplicationController
|
|||
flash[:error] = l(:notice_email_error, e.message)
|
||||
end
|
||||
ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
|
||||
redirect_to :controller => 'settings', :action => 'edit', :tab => 'notifications'
|
||||
redirect_to settings_path(:tab => 'notifications')
|
||||
end
|
||||
|
||||
def info
|
||||
|
|
|
@ -34,7 +34,7 @@ class AuthSourcesController < ApplicationController
|
|||
@auth_source = AuthSource.new_subclass_instance(params[:type], params[:auth_source])
|
||||
if @auth_source.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :action => 'index'
|
||||
redirect_to auth_sources_path
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
|
@ -48,7 +48,7 @@ class AuthSourcesController < ApplicationController
|
|||
@auth_source = AuthSource.find(params[:id])
|
||||
if @auth_source.update_attributes(params[:auth_source])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :action => 'index'
|
||||
redirect_to auth_sources_path
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
|
@ -62,7 +62,7 @@ class AuthSourcesController < ApplicationController
|
|||
rescue Exception => e
|
||||
flash[:error] = l(:error_unable_to_connect, e.message)
|
||||
end
|
||||
redirect_to :action => 'index'
|
||||
redirect_to auth_sources_path
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
@ -71,6 +71,6 @@ class AuthSourcesController < ApplicationController
|
|||
@auth_source.destroy
|
||||
flash[:notice] = l(:notice_successful_delete)
|
||||
end
|
||||
redirect_to :action => 'index'
|
||||
redirect_to auth_sources_path
|
||||
end
|
||||
end
|
||||
|
|
|
@ -99,7 +99,7 @@ class BoardsController < ApplicationController
|
|||
|
||||
private
|
||||
def redirect_to_settings_in_projects
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'
|
||||
redirect_to settings_project_path(@project, :tab => 'boards')
|
||||
end
|
||||
|
||||
def find_board_if_available
|
||||
|
|
|
@ -32,12 +32,12 @@ class CommentsController < ApplicationController
|
|||
flash[:notice] = l(:label_comment_added)
|
||||
end
|
||||
|
||||
redirect_to :controller => 'news', :action => 'show', :id => @news
|
||||
redirect_to news_path(@news)
|
||||
end
|
||||
|
||||
def destroy
|
||||
@news.comments.find(params[:comment_id]).destroy
|
||||
redirect_to :controller => 'news', :action => 'show', :id => @news
|
||||
redirect_to news_path(@news)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -34,7 +34,7 @@ class CustomFieldsController < ApplicationController
|
|||
if request.post? and @custom_field.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
|
||||
redirect_to :action => 'index', :tab => @custom_field.class.name
|
||||
redirect_to custom_fields_path(:tab => @custom_field.class.name)
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
|
@ -47,7 +47,7 @@ class CustomFieldsController < ApplicationController
|
|||
if request.put? and @custom_field.update_attributes(params[:custom_field])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
|
||||
redirect_to :action => 'index', :tab => @custom_field.class.name
|
||||
redirect_to custom_fields_path(:tab => @custom_field.class.name)
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
|
@ -55,10 +55,10 @@ class CustomFieldsController < ApplicationController
|
|||
|
||||
def destroy
|
||||
@custom_field.destroy
|
||||
redirect_to :action => 'index', :tab => @custom_field.class.name
|
||||
redirect_to custom_fields_path(:tab => @custom_field.class.name)
|
||||
rescue
|
||||
flash[:error] = l(:error_can_not_delete_custom_field)
|
||||
redirect_to :action => 'index'
|
||||
redirect_to custom_fields_path(:tab => @custom_field.class.name)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -58,7 +58,7 @@ class DocumentsController < ApplicationController
|
|||
if @document.save
|
||||
render_attachment_warning_if_needed(@document)
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :action => 'index', :project_id => @project
|
||||
redirect_to project_documents_path(@project)
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
|
@ -71,7 +71,7 @@ class DocumentsController < ApplicationController
|
|||
@document.safe_attributes = params[:document]
|
||||
if request.put? and @document.save
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :action => 'show', :id => @document
|
||||
redirect_to document_path(@document)
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
|
@ -79,7 +79,7 @@ class DocumentsController < ApplicationController
|
|||
|
||||
def destroy
|
||||
@document.destroy if request.delete?
|
||||
redirect_to :controller => 'documents', :action => 'index', :project_id => @project
|
||||
redirect_to project_documents_path(@project)
|
||||
end
|
||||
|
||||
def add_attachment
|
||||
|
@ -89,6 +89,6 @@ class DocumentsController < ApplicationController
|
|||
if attachments.present? && attachments[:files].present? && Setting.notified_events.include?('document_added')
|
||||
Mailer.attachments_added(attachments[:files]).deliver
|
||||
end
|
||||
redirect_to :action => 'show', :id => @document
|
||||
redirect_to document_path(@document)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -46,7 +46,7 @@ class EnumerationsController < ApplicationController
|
|||
def create
|
||||
if request.post? && @enumeration.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :action => 'index'
|
||||
redirect_to enumerations_path
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
|
@ -58,7 +58,7 @@ class EnumerationsController < ApplicationController
|
|||
def update
|
||||
if request.put? && @enumeration.update_attributes(params[:enumeration])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :action => 'index'
|
||||
redirect_to enumerations_path
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
|
@ -68,12 +68,12 @@ class EnumerationsController < ApplicationController
|
|||
if !@enumeration.in_use?
|
||||
# No associated objects
|
||||
@enumeration.destroy
|
||||
redirect_to :action => 'index'
|
||||
redirect_to enumerations_path
|
||||
return
|
||||
elsif params[:reassign_to_id]
|
||||
if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id])
|
||||
@enumeration.destroy(reassign_to)
|
||||
redirect_to :action => 'index'
|
||||
redirect_to enumerations_path
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
|
@ -84,7 +84,7 @@ class GroupsController < ApplicationController
|
|||
@group.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to(groups_url) }
|
||||
format.html { redirect_to(groups_path) }
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
end
|
||||
|
@ -93,7 +93,7 @@ class GroupsController < ApplicationController
|
|||
@users = User.find_all_by_id(params[:user_id] || params[:user_ids])
|
||||
@group.users << @users if request.post?
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
|
||||
format.html { redirect_to edit_group_path(@group, :tab => 'users') }
|
||||
format.js
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
|
@ -102,7 +102,7 @@ class GroupsController < ApplicationController
|
|||
def remove_user
|
||||
@group.users.delete(User.find(params[:user_id])) if request.delete?
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
|
||||
format.html { redirect_to edit_group_path(@group, :tab => 'users') }
|
||||
format.js
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
|
@ -117,7 +117,7 @@ class GroupsController < ApplicationController
|
|||
@membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
|
||||
@membership.save if request.post?
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
|
||||
format.html { redirect_to edit_group_path(@group, :tab => 'memberships') }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
@ -125,7 +125,7 @@ class GroupsController < ApplicationController
|
|||
def destroy_membership
|
||||
Member.find(params[:membership_id]).destroy if request.post?
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
|
||||
format.html { redirect_to edit_group_path(@group, :tab => 'memberships') }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,14 +26,14 @@ class IssueCategoriesController < ApplicationController
|
|||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project }
|
||||
format.html { redirect_to_settings_in_projects }
|
||||
format.api { @categories = @project.issue_categories.all }
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project }
|
||||
format.html { redirect_to_settings_in_projects }
|
||||
format.api
|
||||
end
|
||||
end
|
||||
|
@ -55,7 +55,7 @@ class IssueCategoriesController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html do
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
||||
redirect_to_settings_in_projects
|
||||
end
|
||||
format.js
|
||||
format.api { render :action => 'show', :status => :created, :location => issue_category_path(@category) }
|
||||
|
@ -78,7 +78,7 @@ class IssueCategoriesController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
||||
redirect_to_settings_in_projects
|
||||
}
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
|
@ -99,7 +99,7 @@ class IssueCategoriesController < ApplicationController
|
|||
end
|
||||
@category.destroy(reassign_to)
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories' }
|
||||
format.html { redirect_to_settings_in_projects }
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
return
|
||||
|
@ -107,7 +107,12 @@ class IssueCategoriesController < ApplicationController
|
|||
@categories = @project.issue_categories - [@category]
|
||||
end
|
||||
|
||||
private
|
||||
private
|
||||
|
||||
def redirect_to_settings_in_projects
|
||||
redirect_to settings_project_path(@project, :tab => 'categories')
|
||||
end
|
||||
|
||||
# Wrap ApplicationController's find_model_object method to set
|
||||
# @category instead of just @issue_category
|
||||
def find_model_object
|
||||
|
|
|
@ -48,7 +48,7 @@ class IssueRelationsController < ApplicationController
|
|||
saved = @relation.save
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
|
||||
format.html { redirect_to issue_path(@issue) }
|
||||
format.js {
|
||||
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ class IssueRelationsController < ApplicationController
|
|||
@relation.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to issue_path } # TODO : does this really work since @issue is always nil? What is it useful to?
|
||||
format.html { redirect_to issue_path(@relation.issue_from) }
|
||||
format.js
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
|
|
|
@ -0,0 +1,326 @@
|
|||
home / welcome#index
|
||||
signin GET|POST /login(.:format) account#login
|
||||
signout GET|POST /logout(.:format) account#logout
|
||||
register GET|POST /account/register(.:format) account#register
|
||||
lost_password GET|POST /account/lost_password(.:format) account#lost_password
|
||||
account_activate GET /account/activate(.:format) account#activate
|
||||
preview_news GET|POST /news/preview(.:format) previews#news
|
||||
preview_new_issue GET|POST /issues/preview/new/:project_id(.:format) previews#issue
|
||||
preview_edit_issue GET|POST /issues/preview/edit/:id(.:format) previews#issue
|
||||
preview_issue GET|POST /issues/preview(.:format) previews#issue
|
||||
POST /projects/:id/wiki(.:format) wikis#edit
|
||||
GET|POST /projects/:id/wiki/destroy(.:format) wikis#destroy
|
||||
GET|POST /boards/:board_id/topics/new(.:format) messages#new
|
||||
board_message GET /boards/:board_id/topics/:id(.:format) messages#show
|
||||
GET|POST /boards/:board_id/topics/quote/:id(.:format) messages#quote
|
||||
GET /boards/:board_id/topics/:id/edit(.:format) messages#edit
|
||||
POST /boards/:board_id/topics/preview(.:format) messages#preview
|
||||
POST /boards/:board_id/topics/:id/replies(.:format) messages#reply
|
||||
POST /boards/:board_id/topics/:id/edit(.:format) messages#edit
|
||||
POST /boards/:board_id/topics/:id/destroy(.:format) messages#destroy
|
||||
auto_complete_issues GET /issues/auto_complete(.:format) auto_completes#issues
|
||||
issues_context_menu GET|POST /issues/context_menu(.:format) context_menus#issues
|
||||
issue_changes GET /issues/changes(.:format) journals#index
|
||||
quoted_issue POST /issues/:id/quoted(.:format) journals#new {:id=>/\d+/}
|
||||
GET /journals/diff/:id(.:format) journals#diff {:id=>/\d+/}
|
||||
GET|POST /journals/edit/:id(.:format) journals#edit {:id=>/\d+/}
|
||||
GET /projects/:project_id/issues/gantt(.:format) gantts#show
|
||||
issues_gantt GET /issues/gantt(.:format) gantts#show
|
||||
GET /projects/:project_id/issues/calendar(.:format) calendars#show
|
||||
issues_calendar GET /issues/calendar(.:format) calendars#show
|
||||
GET /projects/:id/issues/report(.:format) reports#issue_report
|
||||
GET /projects/:id/issues/report/:detail(.:format) reports#issue_report_details
|
||||
my_account GET|POST /my/account(.:format) my#account
|
||||
my_account_destroy GET|POST /my/account/destroy(.:format) my#destroy
|
||||
my_page GET /my/page(.:format) my#page
|
||||
my GET /my(.:format) my#index
|
||||
my_reset_rss_key POST /my/reset_rss_key(.:format) my#reset_rss_key
|
||||
my_reset_api_key POST /my/reset_api_key(.:format) my#reset_api_key
|
||||
my_password GET|POST /my/password(.:format) my#password
|
||||
my_page_layout GET /my/page_layout(.:format) my#page_layout
|
||||
my_add_block POST /my/add_block(.:format) my#add_block
|
||||
my_remove_block POST /my/remove_block(.:format) my#remove_block
|
||||
my_order_blocks POST /my/order_blocks(.:format) my#order_blocks
|
||||
users GET /users(.:format) users#index
|
||||
POST /users(.:format) users#create
|
||||
new_user GET /users/new(.:format) users#new
|
||||
edit_user GET /users/:id/edit(.:format) users#edit
|
||||
user GET /users/:id(.:format) users#show
|
||||
PUT /users/:id(.:format) users#update
|
||||
DELETE /users/:id(.:format) users#destroy
|
||||
user_membership PUT /users/:id/memberships/:membership_id(.:format) users#edit_membership
|
||||
DELETE /users/:id/memberships/:membership_id(.:format) users#destroy_membership
|
||||
user_memberships POST /users/:id/memberships(.:format) users#edit_membership
|
||||
watchers_new GET /watchers/new(.:format) watchers#new
|
||||
watchers POST /watchers(.:format) watchers#create
|
||||
watchers_append POST /watchers/append(.:format) watchers#append
|
||||
watchers_destroy POST /watchers/destroy(.:format) watchers#destroy
|
||||
watchers_watch POST /watchers/watch(.:format) watchers#watch
|
||||
watchers_unwatch POST /watchers/unwatch(.:format) watchers#unwatch
|
||||
watchers_autocomplete_for_user GET /watchers/autocomplete_for_user(.:format) watchers#autocomplete_for_user
|
||||
GET /projects/:id/settings/:tab(.:format) projects#settings
|
||||
settings_project GET /projects/:id/settings(.:format) projects#settings
|
||||
modules_project POST /projects/:id/modules(.:format) projects#modules
|
||||
archive_project POST /projects/:id/archive(.:format) projects#archive
|
||||
unarchive_project POST /projects/:id/unarchive(.:format) projects#unarchive
|
||||
close_project POST /projects/:id/close(.:format) projects#close
|
||||
reopen_project POST /projects/:id/reopen(.:format) projects#reopen
|
||||
copy_project GET|POST /projects/:id/copy(.:format) projects#copy
|
||||
autocomplete_project_memberships GET /projects/:project_id/memberships/autocomplete(.:format) members#autocomplete
|
||||
project_memberships GET /projects/:project_id/memberships(.:format) members#index
|
||||
POST /projects/:project_id/memberships(.:format) members#create
|
||||
new_project_membership GET /projects/:project_id/memberships/new(.:format) members#new
|
||||
membership GET /memberships/:id(.:format) members#show
|
||||
PUT /memberships/:id(.:format) members#update
|
||||
DELETE /memberships/:id(.:format) members#destroy
|
||||
project_enumerations PUT /projects/:project_id/enumerations(.:format) project_enumerations#update
|
||||
DELETE /projects/:project_id/enumerations(.:format) project_enumerations#destroy
|
||||
GET /projects/:project_id/issues/:copy_from/copy(.:format) issues#new
|
||||
report_project_issue_time_entries GET /projects/:project_id/issues/:issue_id/time_entries/report(.:format) timelog#report
|
||||
project_issue_time_entries GET /projects/:project_id/issues/:issue_id/time_entries(.:format) timelog#index
|
||||
POST /projects/:project_id/issues/:issue_id/time_entries(.:format) timelog#create
|
||||
new_project_issue_time_entry GET /projects/:project_id/issues/:issue_id/time_entries/new(.:format) timelog#new
|
||||
edit_project_issue_time_entry GET /projects/:project_id/issues/:issue_id/time_entries/:id/edit(.:format) timelog#edit
|
||||
project_issue_time_entry GET /projects/:project_id/issues/:issue_id/time_entries/:id(.:format) timelog#show
|
||||
PUT /projects/:project_id/issues/:issue_id/time_entries/:id(.:format) timelog#update
|
||||
DELETE /projects/:project_id/issues/:issue_id/time_entries/:id(.:format) timelog#destroy
|
||||
project_issues GET /projects/:project_id/issues(.:format) issues#index
|
||||
POST /projects/:project_id/issues(.:format) issues#create
|
||||
new_project_issue GET /projects/:project_id/issues/new(.:format) issues#new
|
||||
project_issue_form PUT|POST /projects/:project_id/issues/new(.:format) issues#new
|
||||
project_files GET /projects/:project_id/files(.:format) files#index
|
||||
POST /projects/:project_id/files(.:format) files#create
|
||||
new_project_file GET /projects/:project_id/files/new(.:format) files#new
|
||||
close_completed_project_versions PUT /projects/:project_id/versions/close_completed(.:format) versions#close_completed
|
||||
project_versions POST /projects/:project_id/versions(.:format) versions#create
|
||||
new_project_version GET /projects/:project_id/versions/new(.:format) versions#new
|
||||
GET /projects/:project_id/versions.:format versions#index
|
||||
project_roadmap GET /projects/:project_id/roadmap versions#index
|
||||
GET /projects/:project_id/versions(.:format) versions#index
|
||||
project_news_index GET /projects/:project_id/news(.:format) news#index
|
||||
POST /projects/:project_id/news(.:format) news#create
|
||||
new_project_news GET /projects/:project_id/news/new(.:format) news#new
|
||||
report_project_time_entries GET /projects/:project_id/time_entries/report(.:format) timelog#report
|
||||
project_time_entries GET /projects/:project_id/time_entries(.:format) timelog#index
|
||||
POST /projects/:project_id/time_entries(.:format) timelog#create
|
||||
new_project_time_entry GET /projects/:project_id/time_entries/new(.:format) timelog#new
|
||||
edit_project_time_entry GET /projects/:project_id/time_entries/:id/edit(.:format) timelog#edit
|
||||
project_time_entry GET /projects/:project_id/time_entries/:id(.:format) timelog#show
|
||||
PUT /projects/:project_id/time_entries/:id(.:format) timelog#update
|
||||
DELETE /projects/:project_id/time_entries/:id(.:format) timelog#destroy
|
||||
project_queries POST /projects/:project_id/queries(.:format) queries#create
|
||||
new_project_query GET /projects/:project_id/queries/new(.:format) queries#new
|
||||
project_issue_categories GET /projects/:project_id/issue_categories(.:format) issue_categories#index
|
||||
POST /projects/:project_id/issue_categories(.:format) issue_categories#create
|
||||
new_project_issue_category GET /projects/:project_id/issue_categories/new(.:format) issue_categories#new
|
||||
edit_issue_category GET /issue_categories/:id/edit(.:format) issue_categories#edit
|
||||
issue_category GET /issue_categories/:id(.:format) issue_categories#show
|
||||
PUT /issue_categories/:id(.:format) issue_categories#update
|
||||
DELETE /issue_categories/:id(.:format) issue_categories#destroy
|
||||
project_documents GET /projects/:project_id/documents(.:format) documents#index
|
||||
POST /projects/:project_id/documents(.:format) documents#create
|
||||
new_project_document GET /projects/:project_id/documents/new(.:format) documents#new
|
||||
project_boards GET /projects/:project_id/boards(.:format) boards#index
|
||||
POST /projects/:project_id/boards(.:format) boards#create
|
||||
new_project_board GET /projects/:project_id/boards/new(.:format) boards#new
|
||||
edit_project_board GET /projects/:project_id/boards/:id/edit(.:format) boards#edit
|
||||
project_board GET /projects/:project_id/boards/:id(.:format) boards#show
|
||||
PUT /projects/:project_id/boards/:id(.:format) boards#update
|
||||
DELETE /projects/:project_id/boards/:id(.:format) boards#destroy
|
||||
committers_repository GET|POST /repositories/:id/committers(.:format) repositories#committers
|
||||
project_repositories POST /projects/:project_id/repositories(.:format) repositories#create
|
||||
new_project_repository GET /projects/:project_id/repositories/new(.:format) repositories#new
|
||||
edit_repository GET /repositories/:id/edit(.:format) repositories#edit
|
||||
repository PUT /repositories/:id(.:format) repositories#update
|
||||
DELETE /repositories/:id(.:format) repositories#destroy
|
||||
project_wiki_index GET /projects/:project_id/wiki/index(.:format) wiki#index
|
||||
rename_project_wiki GET /projects/:project_id/wiki/:id/rename(.:format) wiki#rename
|
||||
POST /projects/:project_id/wiki/:id/rename(.:format) wiki#rename
|
||||
history_project_wiki GET /projects/:project_id/wiki/:id/history(.:format) wiki#history
|
||||
diff_project_wiki GET /projects/:project_id/wiki/:id/diff(.:format) wiki#diff
|
||||
preview_project_wiki POST|PUT /projects/:project_id/wiki/:id/preview(.:format) wiki#preview
|
||||
protect_project_wiki POST /projects/:project_id/wiki/:id/protect(.:format) wiki#protect
|
||||
add_attachment_project_wiki POST /projects/:project_id/wiki/:id/add_attachment(.:format) wiki#add_attachment
|
||||
export_project_wiki_index GET /projects/:project_id/wiki/export(.:format) wiki#export
|
||||
date_index_project_wiki_index GET /projects/:project_id/wiki/date_index(.:format) wiki#date_index
|
||||
edit_project_wiki GET /projects/:project_id/wiki/:id/edit(.:format) wiki#edit
|
||||
project_wiki GET /projects/:project_id/wiki/:id(.:format) wiki#show
|
||||
PUT /projects/:project_id/wiki/:id(.:format) wiki#update
|
||||
DELETE /projects/:project_id/wiki/:id(.:format) wiki#destroy
|
||||
GET /projects/:project_id/wiki(.:format) wiki#show
|
||||
GET /projects/:project_id/wiki/:id/:version(.:format) wiki#show
|
||||
DELETE /projects/:project_id/wiki/:id/:version(.:format) wiki#destroy_version
|
||||
GET /projects/:project_id/wiki/:id/:version/annotate(.:format) wiki#annotate
|
||||
GET /projects/:project_id/wiki/:id/:version/diff(.:format) wiki#diff
|
||||
projects GET /projects(.:format) projects#index
|
||||
POST /projects(.:format) projects#create
|
||||
new_project GET /projects/new(.:format) projects#new
|
||||
edit_project GET /projects/:id/edit(.:format) projects#edit
|
||||
project GET /projects/:id(.:format) projects#show
|
||||
PUT /projects/:id(.:format) projects#update
|
||||
DELETE /projects/:id(.:format) projects#destroy
|
||||
bulk_edit_issues GET|POST /issues/bulk_edit(.:format) issues#bulk_edit
|
||||
bulk_update_issues POST /issues/bulk_update(.:format) issues#bulk_update
|
||||
report_issue_time_entries GET /issues/:issue_id/time_entries/report(.:format) timelog#report
|
||||
issue_time_entries GET /issues/:issue_id/time_entries(.:format) timelog#index
|
||||
POST /issues/:issue_id/time_entries(.:format) timelog#create
|
||||
new_issue_time_entry GET /issues/:issue_id/time_entries/new(.:format) timelog#new
|
||||
edit_issue_time_entry GET /issues/:issue_id/time_entries/:id/edit(.:format) timelog#edit
|
||||
issue_time_entry GET /issues/:issue_id/time_entries/:id(.:format) timelog#show
|
||||
PUT /issues/:issue_id/time_entries/:id(.:format) timelog#update
|
||||
DELETE /issues/:issue_id/time_entries/:id(.:format) timelog#destroy
|
||||
issue_relations GET /issues/:issue_id/relations(.:format) issue_relations#index
|
||||
POST /issues/:issue_id/relations(.:format) issue_relations#create
|
||||
relation GET /relations/:id(.:format) issue_relations#show
|
||||
DELETE /relations/:id(.:format) issue_relations#destroy
|
||||
issues GET /issues(.:format) issues#index
|
||||
POST /issues(.:format) issues#create
|
||||
new_issue GET /issues/new(.:format) issues#new
|
||||
edit_issue GET /issues/:id/edit(.:format) issues#edit
|
||||
issue GET /issues/:id(.:format) issues#show
|
||||
PUT /issues/:id(.:format) issues#update
|
||||
DELETE /issues/:id(.:format) issues#destroy
|
||||
DELETE /issues(.:format) issues#destroy
|
||||
queries GET /queries(.:format) queries#index
|
||||
POST /queries(.:format) queries#create
|
||||
new_query GET /queries/new(.:format) queries#new
|
||||
edit_query GET /queries/:id/edit(.:format) queries#edit
|
||||
query PUT /queries/:id(.:format) queries#update
|
||||
DELETE /queries/:id(.:format) queries#destroy
|
||||
news_index GET /news(.:format) news#index
|
||||
edit_news GET /news/:id/edit(.:format) news#edit
|
||||
news GET /news/:id(.:format) news#show
|
||||
PUT /news/:id(.:format) news#update
|
||||
DELETE /news/:id(.:format) news#destroy
|
||||
POST /news/:id/comments(.:format) comments#create
|
||||
DELETE /news/:id/comments/:comment_id(.:format) comments#destroy
|
||||
status_by_version POST /versions/:id/status_by(.:format) versions#status_by
|
||||
edit_version GET /versions/:id/edit(.:format) versions#edit
|
||||
version GET /versions/:id(.:format) versions#show
|
||||
PUT /versions/:id(.:format) versions#update
|
||||
DELETE /versions/:id(.:format) versions#destroy
|
||||
add_attachment_document POST /documents/:id/add_attachment(.:format) documents#add_attachment
|
||||
edit_document GET /documents/:id/edit(.:format) documents#edit
|
||||
document GET /documents/:id(.:format) documents#show
|
||||
PUT /documents/:id(.:format) documents#update
|
||||
DELETE /documents/:id(.:format) documents#destroy
|
||||
time_entries_context_menu GET|POST /time_entries/context_menu(.:format) context_menus#time_entries
|
||||
report_time_entries GET /time_entries/report(.:format) timelog#report
|
||||
bulk_edit_time_entries GET /time_entries/bulk_edit(.:format) timelog#bulk_edit
|
||||
bulk_update_time_entries POST /time_entries/bulk_update(.:format) timelog#bulk_update
|
||||
time_entries GET /time_entries(.:format) timelog#index
|
||||
POST /time_entries(.:format) timelog#create
|
||||
new_time_entry GET /time_entries/new(.:format) timelog#new
|
||||
edit_time_entry GET /time_entries/:id/edit(.:format) timelog#edit
|
||||
time_entry GET /time_entries/:id(.:format) timelog#show
|
||||
PUT /time_entries/:id(.:format) timelog#update
|
||||
DELETE /time_entries/:id(.:format) timelog#destroy {:id=>/\d+/}
|
||||
time_entries_destroy DELETE /time_entries/destroy(.:format) timelog#destroy
|
||||
GET /projects/:id/settings/:tab(.:format) projects#settings
|
||||
GET /projects/:id/activity(.:format) activities#index
|
||||
GET /projects/:id/activity.:format activities#index
|
||||
activity GET /activity(.:format) activities#index
|
||||
GET /projects/:id/repository/:repository_id/statistics(.:format) repositories#stats
|
||||
GET /projects/:id/repository/:repository_id/graph(.:format) repositories#graph
|
||||
GET /projects/:id/repository/:repository_id/changes(/*path(.:ext))(.:format) repositories#changes
|
||||
GET /projects/:id/repository/:repository_id/revisions/:rev(.:format) repositories#revision
|
||||
GET /projects/:id/repository/:repository_id/revision(.:format) repositories#revision
|
||||
POST /projects/:id/repository/:repository_id/revisions/:rev/issues(.:format) repositories#add_related_issue
|
||||
DELETE /projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id(.:format) repositories#remove_related_issue
|
||||
GET /projects/:id/repository/:repository_id/revisions(.:format) repositories#revisions
|
||||
GET /projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext)) repositories#(?-mix:(browse|show|entry|raw|annotate|diff)) {:rev=>/[a-z0-9\.\-_]+/}
|
||||
GET /projects/:id/repository/statistics(.:format) repositories#stats
|
||||
GET /projects/:id/repository/graph(.:format) repositories#graph
|
||||
GET /projects/:id/repository/changes(/*path(.:ext))(.:format) repositories#changes
|
||||
GET /projects/:id/repository/revisions(.:format) repositories#revisions
|
||||
GET /projects/:id/repository/revisions/:rev(.:format) repositories#revision
|
||||
GET /projects/:id/repository/revision(.:format) repositories#revision
|
||||
POST /projects/:id/repository/revisions/:rev/issues(.:format) repositories#add_related_issue
|
||||
DELETE /projects/:id/repository/revisions/:rev/issues/:issue_id(.:format) repositories#remove_related_issue
|
||||
GET /projects/:id/repository/revisions/:rev/:action(/*path(.:ext)) repositories#(?-mix:(browse|show|entry|raw|annotate|diff)) {:rev=>/[a-z0-9\.\-_]+/}
|
||||
GET /projects/:id/repository/:repository_id/:action(/*path(.:ext))(.:format) repositories#(?-mix:(browse|show|entry|raw|changes|annotate|diff))
|
||||
GET /projects/:id/repository/:action(/*path(.:ext))(.:format) repositories#(?-mix:(browse|show|entry|raw|changes|annotate|diff))
|
||||
GET /projects/:id/repository/:repository_id(.:format) repositories#show
|
||||
GET /projects/:id/repository(.:format) repositories#show
|
||||
GET /attachments/:id/:filename(.:format) attachments#show {:id=>/\d+/, :filename=>/.*/}
|
||||
GET /attachments/download/:id/:filename(.:format) attachments#download {:id=>/\d+/, :filename=>/.*/}
|
||||
GET /attachments/download/:id(.:format) attachments#download {:id=>/\d+/}
|
||||
GET /attachments/thumbnail/:id(/:size)(.:format) attachments#thumbnail {:id=>/\d+/, :size=>/\d+/}
|
||||
attachment GET /attachments/:id(.:format) attachments#show
|
||||
DELETE /attachments/:id(.:format) attachments#destroy
|
||||
autocomplete_for_user_group GET /groups/:id/autocomplete_for_user(.:format) groups#autocomplete_for_user
|
||||
groups GET /groups(.:format) groups#index
|
||||
POST /groups(.:format) groups#create
|
||||
new_group GET /groups/new(.:format) groups#new
|
||||
edit_group GET /groups/:id/edit(.:format) groups#edit
|
||||
group GET /groups/:id(.:format) groups#show
|
||||
PUT /groups/:id(.:format) groups#update
|
||||
DELETE /groups/:id(.:format) groups#destroy
|
||||
group_users POST /groups/:id/users(.:format) groups#add_users {:id=>/\d+/}
|
||||
group_user DELETE /groups/:id/users/:user_id(.:format) groups#remove_user {:id=>/\d+/}
|
||||
POST /groups/destroy_membership/:id(.:format) groups#destroy_membership {:id=>/\d+/}
|
||||
POST /groups/edit_membership/:id(.:format) groups#edit_membership {:id=>/\d+/}
|
||||
fields_trackers GET|POST /trackers/fields(.:format) trackers#fields
|
||||
trackers GET /trackers(.:format) trackers#index
|
||||
POST /trackers(.:format) trackers#create
|
||||
new_tracker GET /trackers/new(.:format) trackers#new
|
||||
edit_tracker GET /trackers/:id/edit(.:format) trackers#edit
|
||||
tracker PUT /trackers/:id(.:format) trackers#update
|
||||
DELETE /trackers/:id(.:format) trackers#destroy
|
||||
update_issue_done_ratio_issue_statuses POST /issue_statuses/update_issue_done_ratio(.:format) issue_statuses#update_issue_done_ratio
|
||||
issue_statuses GET /issue_statuses(.:format) issue_statuses#index
|
||||
POST /issue_statuses(.:format) issue_statuses#create
|
||||
new_issue_status GET /issue_statuses/new(.:format) issue_statuses#new
|
||||
edit_issue_status GET /issue_statuses/:id/edit(.:format) issue_statuses#edit
|
||||
issue_status PUT /issue_statuses/:id(.:format) issue_statuses#update
|
||||
DELETE /issue_statuses/:id(.:format) issue_statuses#destroy
|
||||
custom_fields GET /custom_fields(.:format) custom_fields#index
|
||||
POST /custom_fields(.:format) custom_fields#create
|
||||
new_custom_field GET /custom_fields/new(.:format) custom_fields#new
|
||||
edit_custom_field GET /custom_fields/:id/edit(.:format) custom_fields#edit
|
||||
custom_field PUT /custom_fields/:id(.:format) custom_fields#update
|
||||
DELETE /custom_fields/:id(.:format) custom_fields#destroy
|
||||
permissions_roles GET|POST /roles/permissions(.:format) roles#permissions
|
||||
roles GET /roles(.:format) roles#index
|
||||
POST /roles(.:format) roles#create
|
||||
new_role GET /roles/new(.:format) roles#new
|
||||
edit_role GET /roles/:id/edit(.:format) roles#edit
|
||||
role GET /roles/:id(.:format) roles#show
|
||||
PUT /roles/:id(.:format) roles#update
|
||||
DELETE /roles/:id(.:format) roles#destroy
|
||||
enumerations GET /enumerations(.:format) enumerations#index
|
||||
POST /enumerations(.:format) enumerations#create
|
||||
new_enumeration GET /enumerations/new(.:format) enumerations#new
|
||||
edit_enumeration GET /enumerations/:id/edit(.:format) enumerations#edit
|
||||
enumeration PUT /enumerations/:id(.:format) enumerations#update
|
||||
DELETE /enumerations/:id(.:format) enumerations#destroy
|
||||
GET /enumerations/:type(.:format) enumerations#index
|
||||
GET /projects/:id/search(.:format) search#index
|
||||
search GET /search(.:format) search#index
|
||||
mail_handler POST /mail_handler(.:format) mail_handler#index
|
||||
admin GET /admin(.:format) admin#index
|
||||
admin_projects GET /admin/projects(.:format) admin#projects
|
||||
admin_plugins GET /admin/plugins(.:format) admin#plugins
|
||||
admin_info GET /admin/info(.:format) admin#info
|
||||
admin_test_email GET /admin/test_email(.:format) admin#test_email
|
||||
admin_default_configuration POST /admin/default_configuration(.:format) admin#default_configuration
|
||||
try_connection_auth_source GET /auth_sources/:id/test_connection(.:format) auth_sources#test_connection
|
||||
auth_sources GET /auth_sources(.:format) auth_sources#index
|
||||
POST /auth_sources(.:format) auth_sources#create
|
||||
new_auth_source GET /auth_sources/new(.:format) auth_sources#new
|
||||
edit_auth_source GET /auth_sources/:id/edit(.:format) auth_sources#edit
|
||||
auth_source GET /auth_sources/:id(.:format) auth_sources#show
|
||||
PUT /auth_sources/:id(.:format) auth_sources#update
|
||||
DELETE /auth_sources/:id(.:format) auth_sources#destroy
|
||||
workflows GET /workflows(.:format) workflows#index
|
||||
workflows_edit GET|POST /workflows/edit(.:format) workflows#edit
|
||||
workflows_permissions GET|POST /workflows/permissions(.:format) workflows#permissions
|
||||
workflows_copy GET|POST /workflows/copy(.:format) workflows#copy
|
||||
settings GET /settings(.:format) settings#index
|
||||
settings_edit GET|POST /settings/edit(.:format) settings#edit
|
||||
GET|POST /settings/plugin/:id(.:format) settings#plugin
|
||||
sys_projects GET /sys/projects(.:format) sys#projects
|
||||
POST /sys/projects/:id/repository(.:format) sys#create_project_repository
|
||||
sys_fetch_changesets GET /sys/fetch_changesets(.:format) sys#fetch_changesets
|
||||
uploads POST /uploads(.:format) attachments#upload
|
||||
GET /robots.txt(.:format) welcome#robots
|
|
@ -90,7 +90,7 @@ class AdminControllerTest < ActionController::TestCase
|
|||
ActionMailer::Base.deliveries.clear
|
||||
|
||||
get :test_email
|
||||
assert_redirected_to '/settings/edit?tab=notifications'
|
||||
assert_redirected_to '/settings?tab=notifications'
|
||||
mail = ActionMailer::Base.deliveries.last
|
||||
assert_not_nil mail
|
||||
user = User.find(1)
|
||||
|
@ -100,7 +100,7 @@ class AdminControllerTest < ActionController::TestCase
|
|||
def test_test_email_failure_should_display_the_error
|
||||
Mailer.stubs(:test_email).raises(Exception, 'Some error message')
|
||||
get :test_email
|
||||
assert_redirected_to '/settings/edit?tab=notifications'
|
||||
assert_redirected_to '/settings?tab=notifications'
|
||||
assert_match /Some error message/, flash[:error]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue