chore(rubocop): giganto rubocop commit.
muahahahah
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
class ApplicationController < ActionController::Base
|
||||
before_action :authenticated, :has_info, :create_analytic, :mailer_options
|
||||
helper_method :current_user, :is_admin?, :sanitize_font
|
||||
@@ -22,8 +23,8 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def authenticated
|
||||
path = request.fullpath.present? ? root_url(:url => request.fullpath) : root_url
|
||||
redirect_to path and reset_session if not current_user
|
||||
path = request.fullpath.present? ? root_url(url: request.fullpath) : root_url
|
||||
redirect_to path and reset_session if !current_user
|
||||
end
|
||||
|
||||
def is_admin?
|
||||
@@ -31,7 +32,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def administrative
|
||||
if not is_admin?
|
||||
if !is_admin?
|
||||
redirect_to root_url
|
||||
end
|
||||
end
|
||||
@@ -51,7 +52,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def create_analytic
|
||||
Analytics.create({ :ip_address => request.remote_ip, :referrer => request.referrer, :user_agent => request.user_agent})
|
||||
Analytics.create({ ip_address: request.remote_ip, referrer: request.referrer, user_agent: request.user_agent})
|
||||
end
|
||||
|
||||
def sanitize_font(css)
|
||||
|
||||
Reference in New Issue
Block a user