Remove redundant rescue_from calls.
These are redundant because ApplicationController rescues these exceptions already.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
module Admin
|
||||
class UsersController < ApplicationController
|
||||
before_filter :moderator_only
|
||||
rescue_from User::PrivilegeError, :with => :access_denied
|
||||
|
||||
def edit
|
||||
@user = User.find(params[:id])
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class CommentsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_filter :member_only, :except => [:index, :search, :show]
|
||||
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
|
||||
skip_before_filter :api_check
|
||||
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class DmailsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_filter :member_only
|
||||
rescue_from User::PrivilegeError, :with => :access_denied
|
||||
|
||||
def new
|
||||
if params[:respond_to_id]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class LegacyController < ApplicationController
|
||||
before_filter :member_only, :only => [:create_post]
|
||||
rescue_from PostSets::SearchError, :with => :rescue_exception
|
||||
|
||||
def posts
|
||||
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit], format: "json")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
module Maintenance
|
||||
module User
|
||||
class DeletionsController < ApplicationController
|
||||
rescue_from UserDeletion::ValidationError, :with => :rescue_exception
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ module Moderator
|
||||
class PostsController < ApplicationController
|
||||
before_filter :approver_only, :only => [:delete, :undelete, :move_favorites, :ban, :unban, :confirm_delete, :confirm_move_favorites, :confirm_ban]
|
||||
before_filter :admin_only, :only => [:expunge]
|
||||
rescue_from ::PostFlag::Error, ::Post::ApprovalError, :with => :rescue_exception
|
||||
skip_before_filter :api_check
|
||||
|
||||
def confirm_delete
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class PostVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
|
||||
|
||||
def index
|
||||
@post_versions = PostVersion.search(params[:search]).order("updated_at desc, id desc").paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
|
||||
|
||||
@@ -3,10 +3,6 @@ class PostsController < ApplicationController
|
||||
before_filter :builder_only, :only => [:copy_notes]
|
||||
before_filter :enable_cors, :only => [:index, :show]
|
||||
respond_to :html, :xml, :json
|
||||
rescue_from PostSets::SearchError, :with => :rescue_exception
|
||||
rescue_from Post::SearchError, :with => :rescue_exception
|
||||
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
|
||||
rescue_from ActiveRecord::RecordNotFound, :with => :rescue_exception
|
||||
|
||||
def index
|
||||
if params[:md5].present?
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class UploadsController < ApplicationController
|
||||
before_filter :member_only
|
||||
respond_to :html, :xml, :json, :js
|
||||
rescue_from Upload::Error, :with => :rescue_exception
|
||||
|
||||
def new
|
||||
@upload = Upload.new
|
||||
|
||||
@@ -2,7 +2,6 @@ class UserNameChangeRequestsController < ApplicationController
|
||||
before_filter :member_only, :only => [:index, :show]
|
||||
before_filter :gold_only, :only => [:new, :create]
|
||||
before_filter :admin_only, :only => [:approve, :reject]
|
||||
rescue_from User::PrivilegeError, :with => :access_denied
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
def new
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class UsersController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_filter :member_only, :only => [:edit, :update, :upgrade]
|
||||
rescue_from User::PrivilegeError, :with => :access_denied
|
||||
skip_before_filter :api_check
|
||||
|
||||
def new
|
||||
|
||||
@@ -3,8 +3,6 @@ class WikiPagesController < ApplicationController
|
||||
before_filter :member_only, :except => [:index, :show, :show_or_new]
|
||||
before_filter :builder_only, :only => [:destroy]
|
||||
before_filter :normalize_search_params, :only => [:index]
|
||||
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
|
||||
rescue_from ActiveRecord::RecordNotFound, :with => :rescue_exception
|
||||
|
||||
def new
|
||||
@wiki_page = WikiPage.new(params[:wiki_page])
|
||||
|
||||
Reference in New Issue
Block a user