From 546498a14a18c13e45aee37819c4a120e26cc11d Mon Sep 17 00:00:00 2001 From: Karthik Sivadas Date: Wed, 21 Oct 2020 19:52:09 +0530 Subject: [PATCH 1/2] Deprecation: Module#parent has been renamed to module_parent (abraham gem)[ENG-1094] (#35) --- app/helpers/abraham_helper.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/helpers/abraham_helper.rb b/app/helpers/abraham_helper.rb index 06abb78..4072228 100644 --- a/app/helpers/abraham_helper.rb +++ b/app/helpers/abraham_helper.rb @@ -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 From c85dade38ee7070dc1dbb3f197676d96536a2c00 Mon Sep 17 00:00:00 2001 From: Michael Deutsch Date: Thu, 22 Oct 2020 13:55:24 -0400 Subject: [PATCH 2/2] Update version to 2.1.2 --- lib/abraham/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/abraham/version.rb b/lib/abraham/version.rb index 5540f8c..a0a8845 100644 --- a/lib/abraham/version.rb +++ b/lib/abraham/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Abraham - VERSION = "2.1.1" + VERSION = "2.1.2" end