From cf05dac24311827bd29193c9cba2b6619b231534 Mon Sep 17 00:00:00 2001 From: Steve Frank Date: Mon, 30 Oct 2017 15:07:57 -0400 Subject: [PATCH] Update compatibility to later versions of ActiveRecord --- Gemfile.lock | 2 +- lib/proactive_support/mgmt/flags.rb | 2 +- lib/proactive_support/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 612c11d..28bc86c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - proactive_support (0.0.6) + proactive_support (0.0.8) activerecord (>= 3) GEM diff --git a/lib/proactive_support/mgmt/flags.rb b/lib/proactive_support/mgmt/flags.rb index 611f4a1..320d653 100644 --- a/lib/proactive_support/mgmt/flags.rb +++ b/lib/proactive_support/mgmt/flags.rb @@ -5,7 +5,7 @@ class << self def set(customer_id, source, identifier, filter, message, options = {}) digest = to_digest source, identifier, filter - ::ProactiveSupport::Flag.find_or_initialize_by_customer_id_and_digest(customer_id, digest).tap do |f| + ::ProactiveSupport::Flag.where(customer_id: customer_id, digest: digest).first_or_initialize.tap do |f| f.source = source f.identifier = identifier f.filter = clean_object filter diff --git a/lib/proactive_support/version.rb b/lib/proactive_support/version.rb index 06b249e..261e2a4 100644 --- a/lib/proactive_support/version.rb +++ b/lib/proactive_support/version.rb @@ -1,3 +1,3 @@ module ProactiveSupport - VERSION = '0.0.7' + VERSION = '0.0.8' end