Remove obsolete URL helpers
We now use `polymorphic_hierarchy_path` instead.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
class CommentsController < ApplicationController
|
||||
include CustomUrlsHelper
|
||||
|
||||
before_action :authenticate_user!, only: :create
|
||||
before_action :load_commentable, only: :create
|
||||
before_action :verify_resident_for_commentable!, only: :create
|
||||
@@ -104,7 +102,7 @@ class CommentsController < ApplicationController
|
||||
return if current_user.administrator? || current_user.moderator?
|
||||
|
||||
if @commentable.respond_to?(:comments_closed?) && @commentable.comments_closed?
|
||||
redirect_to @commentable, alert: t("comments.comments_closed")
|
||||
redirect_to polymorphic_hierarchy_path(@commentable), alert: t("comments.comments_closed")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
class NotificationsController < ApplicationController
|
||||
include CustomUrlsHelper
|
||||
|
||||
before_action :authenticate_user!
|
||||
skip_authorization_check
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
module CustomUrlsHelper
|
||||
def legislation_question_url(question)
|
||||
legislation_process_question_url(question.process, question)
|
||||
end
|
||||
|
||||
def legislation_annotation_url(annotation)
|
||||
legislation_process_question_url(annotation.draft_version.process, annotation.draft_version, annotation)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user