@@ -73,7 +73,7 class AttachmentsController < ApplicationController | |||
|
73 | 73 | end |
|
74 | 74 | else |
|
75 | 75 | # No thumbnail for the attachment or thumbnail could not be created |
|
76 | render :nothing => true, :status => 404 | |
|
76 | head 404 | |
|
77 | 77 | end |
|
78 | 78 | end |
|
79 | 79 | |
@@ -81,7 +81,7 class AttachmentsController < ApplicationController | |||
|
81 | 81 | # Make sure that API users get used to set this content type |
|
82 | 82 | # as it won't trigger Rails' automatic parsing of the request body for parameters |
|
83 | 83 | unless request.content_type == 'application/octet-stream' |
|
84 | render :nothing => true, :status => 406 | |
|
84 | head 406 | |
|
85 | 85 | return |
|
86 | 86 | end |
|
87 | 87 |
@@ -91,12 +91,12 class BoardsController < ApplicationController | |||
|
91 | 91 | flash[:notice] = l(:notice_successful_update) |
|
92 | 92 | redirect_to_settings_in_projects |
|
93 | 93 | } |
|
94 |
format.js { |
|
|
94 | format.js { head 200 } | |
|
95 | 95 | end |
|
96 | 96 | else |
|
97 | 97 | respond_to do |format| |
|
98 | 98 | format.html { render :action => 'edit' } |
|
99 |
format.js { |
|
|
99 | format.js { head 422 } | |
|
100 | 100 | end |
|
101 | 101 | end |
|
102 | 102 | end |
@@ -60,12 +60,12 class CustomFieldsController < ApplicationController | |||
|
60 | 60 | flash[:notice] = l(:notice_successful_update) |
|
61 | 61 | redirect_back_or_default edit_custom_field_path(@custom_field) |
|
62 | 62 | } |
|
63 |
format.js { |
|
|
63 | format.js { head 200 } | |
|
64 | 64 | end |
|
65 | 65 | else |
|
66 | 66 | respond_to do |format| |
|
67 | 67 | format.html { render :action => 'edit' } |
|
68 |
format.js { |
|
|
68 | format.js { head 422 } | |
|
69 | 69 | end |
|
70 | 70 | end |
|
71 | 71 | end |
@@ -62,12 +62,12 class EnumerationsController < ApplicationController | |||
|
62 | 62 | flash[:notice] = l(:notice_successful_update) |
|
63 | 63 | redirect_to enumerations_path |
|
64 | 64 | } |
|
65 |
format.js { |
|
|
65 | format.js { head 200 } | |
|
66 | 66 | end |
|
67 | 67 | else |
|
68 | 68 | respond_to do |format| |
|
69 | 69 | format.html { render :action => 'edit' } |
|
70 |
format.js { |
|
|
70 | format.js { head 422 } | |
|
71 | 71 | end |
|
72 | 72 | end |
|
73 | 73 | end |
@@ -25,7 +25,7 class IssueRelationsController < ApplicationController | |||
|
25 | 25 | @relations = @issue.relations |
|
26 | 26 | |
|
27 | 27 | respond_to do |format| |
|
28 |
format.html { |
|
|
28 | format.html { head 200 } | |
|
29 | 29 | format.api |
|
30 | 30 | end |
|
31 | 31 | end |
@@ -34,7 +34,7 class IssueRelationsController < ApplicationController | |||
|
34 | 34 | raise Unauthorized unless @relation.visible? |
|
35 | 35 | |
|
36 | 36 | respond_to do |format| |
|
37 |
format.html { |
|
|
37 | format.html { head 200 } | |
|
38 | 38 | format.api |
|
39 | 39 | end |
|
40 | 40 | end |
@@ -56,12 +56,12 class IssueStatusesController < ApplicationController | |||
|
56 | 56 | flash[:notice] = l(:notice_successful_update) |
|
57 | 57 | redirect_to issue_statuses_path(:page => params[:page]) |
|
58 | 58 | } |
|
59 |
format.js { |
|
|
59 | format.js { head 200 } | |
|
60 | 60 | end |
|
61 | 61 | else |
|
62 | 62 | respond_to do |format| |
|
63 | 63 | format.html { render :action => 'edit' } |
|
64 |
format.js { |
|
|
64 | format.js { head 422 } | |
|
65 | 65 | end |
|
66 | 66 | end |
|
67 | 67 | end |
@@ -84,7 +84,7 class IssuesController < ApplicationController | |||
|
84 | 84 | else |
|
85 | 85 | respond_to do |format| |
|
86 | 86 | format.html { render(:template => 'issues/index', :layout => !request.xhr?) } |
|
87 |
format.any(:atom, :csv, :pdf) { |
|
|
87 | format.any(:atom, :csv, :pdf) { head 422 } | |
|
88 | 88 | format.api { render_validation_errors(@query) } |
|
89 | 89 | end |
|
90 | 90 | end |
@@ -27,9 +27,9 class MailHandlerController < ActionController::Base | |||
|
27 | 27 | options = params.dup |
|
28 | 28 | email = options.delete(:email) |
|
29 | 29 | if MailHandler.receive(email, options) |
|
30 | render :nothing => true, :status => :created | |
|
30 | head :created | |
|
31 | 31 | else |
|
32 |
|
|
|
32 | head :unprocessable_entity | |
|
33 | 33 | end |
|
34 | 34 | end |
|
35 | 35 |
@@ -206,6 +206,6 class MyController < ApplicationController | |||
|
206 | 206 | @user.pref.save |
|
207 | 207 | end |
|
208 | 208 | end |
|
209 | render :nothing => true | |
|
209 | head 200 | |
|
210 | 210 | end |
|
211 | 211 | end |
@@ -116,7 +116,7 class RepositoriesController < ApplicationController | |||
|
116 | 116 | @entries = @repository.entries(@path, @rev) |
|
117 | 117 | @changeset = @repository.find_changeset_by_name(@rev) |
|
118 | 118 | if request.xhr? |
|
119 |
@entries ? render(:partial => 'dir_list_content') : |
|
|
119 | @entries ? render(:partial => 'dir_list_content') : head(200) | |
|
120 | 120 | else |
|
121 | 121 | (show_error_not_found; return) unless @entries |
|
122 | 122 | @changesets = @repository.latest_changesets(@path, @rev) |
@@ -80,12 +80,12 class RolesController < ApplicationController | |||
|
80 | 80 | flash[:notice] = l(:notice_successful_update) |
|
81 | 81 | redirect_to roles_path(:page => params[:page]) |
|
82 | 82 | } |
|
83 |
format.js { |
|
|
83 | format.js { head 200 } | |
|
84 | 84 | end |
|
85 | 85 | else |
|
86 | 86 | respond_to do |format| |
|
87 | 87 | format.html { render :action => 'edit' } |
|
88 |
format.js { |
|
|
88 | format.js { head 422 } | |
|
89 | 89 | end |
|
90 | 90 | end |
|
91 | 91 | end |
@@ -31,7 +31,7 class SysController < ActionController::Base | |||
|
31 | 31 | def create_project_repository |
|
32 | 32 | project = Project.find(params[:id]) |
|
33 | 33 | if project.repository |
|
34 | render :nothing => true, :status => 409 | |
|
34 | head 409 | |
|
35 | 35 | else |
|
36 | 36 | logger.info "Repository for #{project.name} was reported to be created by #{request.remote_ip}." |
|
37 | 37 | repository = Repository.factory(params[:vendor], params[:repository]) |
@@ -39,7 +39,7 class SysController < ActionController::Base | |||
|
39 | 39 | if repository.save |
|
40 | 40 | render :xml => {repository.class.name.underscore.gsub('/', '-') => {:id => repository.id, :url => repository.url}}, :status => 201 |
|
41 | 41 | else |
|
42 | render :nothing => true, :status => 422 | |
|
42 | head 422 | |
|
43 | 43 | end |
|
44 | 44 | end |
|
45 | 45 | end |
@@ -64,9 +64,9 class SysController < ActionController::Base | |||
|
64 | 64 | repository.fetch_changesets |
|
65 | 65 | end |
|
66 | 66 | end |
|
67 | render :nothing => true, :status => 200 | |
|
67 | head 200 | |
|
68 | 68 | rescue ActiveRecord::RecordNotFound |
|
69 | render :nothing => true, :status => 404 | |
|
69 | head 404 | |
|
70 | 70 | end |
|
71 | 71 | |
|
72 | 72 | protected |
@@ -88,7 +88,7 class TimelogController < ApplicationController | |||
|
88 | 88 | def show |
|
89 | 89 | respond_to do |format| |
|
90 | 90 | # TODO: Implement html response |
|
91 |
format.html { |
|
|
91 | format.html { head 406 } | |
|
92 | 92 | format.api |
|
93 | 93 | end |
|
94 | 94 | end |
@@ -67,7 +67,7 class TrackersController < ApplicationController | |||
|
67 | 67 | flash[:notice] = l(:notice_successful_update) |
|
68 | 68 | redirect_to trackers_path(:page => params[:page]) |
|
69 | 69 | } |
|
70 |
format.js { |
|
|
70 | format.js { head 200 } | |
|
71 | 71 | end |
|
72 | 72 | else |
|
73 | 73 | respond_to do |format| |
@@ -75,7 +75,7 class TrackersController < ApplicationController | |||
|
75 | 75 | edit |
|
76 | 76 | render :action => 'edit' |
|
77 | 77 | } |
|
78 |
format.js { |
|
|
78 | format.js { head 422 } | |
|
79 | 79 | end |
|
80 | 80 | end |
|
81 | 81 | end |
General Comments 0
You need to be logged in to leave comments.
Login now