Deprecation: Module#parent has been renamed to module_parent (abraham gem)[ENG-1094] (#35)

This commit is contained in:
Karthik Sivadas 2020-10-21 19:52:09 +05:30 committed by GitHub
parent 1d4e2b6491
commit 546498a14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,9 +25,18 @@ module AbrahamHelper
end
def abraham_cookie_prefix
"abraham-#{Rails.application.class.parent.to_s.underscore}-#{current_user.id}-#{controller_name}-#{action_name}"
"abraham-#{fetch_application_name.to_s.underscore}-#{current_user.id}-#{controller_name}-#{action_name}"
end
def fetch_application_name
if Module.method_defined?(:module_parent)
Rails.application.class.module_parent
else
Rails.application.class.parent
end
end
def abraham_domain
request.host
end