Remove unused method in users controller
It isn't used since commit fc57bad1c.
This commit is contained in:
@@ -2,7 +2,6 @@ class UsersController < ApplicationController
|
|||||||
has_filters %w[proposals debates budget_investments comments follows], only: :show
|
has_filters %w[proposals debates budget_investments comments follows], only: :show
|
||||||
|
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
helper_method :author?
|
|
||||||
helper_method :valid_interests_access?
|
helper_method :valid_interests_access?
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@@ -79,10 +78,6 @@ class UsersController < ApplicationController
|
|||||||
@user.public_interests || authorized_current_user?
|
@user.public_interests || authorized_current_user?
|
||||||
end
|
end
|
||||||
|
|
||||||
def author?(proposal)
|
|
||||||
proposal.author_id == current_user.id if current_user
|
|
||||||
end
|
|
||||||
|
|
||||||
def authorized_current_user?
|
def authorized_current_user?
|
||||||
@authorized_current_user ||= current_user && (current_user == @user || current_user.moderator? || current_user.administrator?)
|
@authorized_current_user ||= current_user && (current_user == @user || current_user.moderator? || current_user.administrator?)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user