end
else
# No thumbnail for the attachment or thumbnail could not be created
- render :nothing => true, :status => 404
+ head 404
end
end
# Make sure that API users get used to set this content type
# as it won't trigger Rails' automatic parsing of the request body for parameters
unless request.content_type == 'application/octet-stream'
- render :nothing => true, :status => 406
+ head 406
return
end
flash[:notice] = l(:notice_successful_update)
redirect_to_settings_in_projects
}
- format.js { render :nothing => true }
+ format.js { head 200 }
end
else
respond_to do |format|
format.html { render :action => 'edit' }
- format.js { render :nothing => true, :status => 422 }
+ format.js { head 422 }
end
end
end
flash[:notice] = l(:notice_successful_update)
redirect_back_or_default edit_custom_field_path(@custom_field)
}
- format.js { render :nothing => true }
+ format.js { head 200 }
end
else
respond_to do |format|
format.html { render :action => 'edit' }
- format.js { render :nothing => true, :status => 422 }
+ format.js { head 422 }
end
end
end
flash[:notice] = l(:notice_successful_update)
redirect_to enumerations_path
}
- format.js { render :nothing => true }
+ format.js { head 200 }
end
else
respond_to do |format|
format.html { render :action => 'edit' }
- format.js { render :nothing => true, :status => 422 }
+ format.js { head 422 }
end
end
end
@relations = @issue.relations
respond_to do |format|
- format.html { render :nothing => true }
+ format.html { head 200 }
format.api
end
end
raise Unauthorized unless @relation.visible?
respond_to do |format|
- format.html { render :nothing => true }
+ format.html { head 200 }
format.api
end
end
flash[:notice] = l(:notice_successful_update)
redirect_to issue_statuses_path(:page => params[:page])
}
- format.js { render :nothing => true }
+ format.js { head 200 }
end
else
respond_to do |format|
format.html { render :action => 'edit' }
- format.js { render :nothing => true, :status => 422 }
+ format.js { head 422 }
end
end
end
else
respond_to do |format|
format.html { render(:template => 'issues/index', :layout => !request.xhr?) }
- format.any(:atom, :csv, :pdf) { render(:nothing => true) }
+ format.any(:atom, :csv, :pdf) { head 422 }
format.api { render_validation_errors(@query) }
end
end
options = params.dup
email = options.delete(:email)
if MailHandler.receive(email, options)
- render :nothing => true, :status => :created
+ head :created
else
- render :nothing => true, :status => :unprocessable_entity
+ head :unprocessable_entity
end
end
@user.pref.save
end
end
- render :nothing => true
+ head 200
end
end
@entries = @repository.entries(@path, @rev)
@changeset = @repository.find_changeset_by_name(@rev)
if request.xhr?
- @entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
+ @entries ? render(:partial => 'dir_list_content') : head(200)
else
(show_error_not_found; return) unless @entries
@changesets = @repository.latest_changesets(@path, @rev)
flash[:notice] = l(:notice_successful_update)
redirect_to roles_path(:page => params[:page])
}
- format.js { render :nothing => true }
+ format.js { head 200 }
end
else
respond_to do |format|
format.html { render :action => 'edit' }
- format.js { render :nothing => true, :status => 422 }
+ format.js { head 422 }
end
end
end
def create_project_repository
project = Project.find(params[:id])
if project.repository
- render :nothing => true, :status => 409
+ head 409
else
logger.info "Repository for #{project.name} was reported to be created by #{request.remote_ip}."
repository = Repository.factory(params[:vendor], params[:repository])
if repository.save
render :xml => {repository.class.name.underscore.gsub('/', '-') => {:id => repository.id, :url => repository.url}}, :status => 201
else
- render :nothing => true, :status => 422
+ head 422
end
end
end
repository.fetch_changesets
end
end
- render :nothing => true, :status => 200
+ head 200
rescue ActiveRecord::RecordNotFound
- render :nothing => true, :status => 404
+ head 404
end
protected
def show
respond_to do |format|
# TODO: Implement html response
- format.html { render :nothing => true, :status => 406 }
+ format.html { head 406 }
format.api
end
end
flash[:notice] = l(:notice_successful_update)
redirect_to trackers_path(:page => params[:page])
}
- format.js { render :nothing => true }
+ format.js { head 200 }
end
else
respond_to do |format|
edit
render :action => 'edit'
}
- format.js { render :nothing => true, :status => 422 }
+ format.js { head 422 }
end
end
end