app controller: clean up helpers.

* Move `show_moderation_notice?` out.
* Don't need to declare `helper :pagination` manually.
This commit is contained in:
evazion
2019-08-24 22:55:36 -05:00
parent 491cae6c60
commit bb7c993f4a
2 changed files with 6 additions and 8 deletions

View File

@@ -217,6 +217,10 @@ module ApplicationHelper
end
end
def show_moderation_notice?
CurrentUser.can_approve_posts? && (cookies[:moderated].blank? || Time.at(cookies[:moderated].to_i) < 20.hours.ago)
end
protected
def nav_link_match(controller, url)
url =~ case controller