From f73407c2c62bdec2b20b90d0251c75c5423c13b3 Mon Sep 17 00:00:00 2001 From: Asher Cerka <83976948+ACerka-Springbuk@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:40:27 -0500 Subject: [PATCH] APP-3014 Update to use self.id instead of self[:id] as the later has been deprecated (#31) --- lib/odbc_adapter/concerns/easy_identified.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/odbc_adapter/concerns/easy_identified.rb b/lib/odbc_adapter/concerns/easy_identified.rb index 0a214e1f..fc6e7041 100644 --- a/lib/odbc_adapter/concerns/easy_identified.rb +++ b/lib/odbc_adapter/concerns/easy_identified.rb @@ -8,17 +8,17 @@ module EasyIdentified alias_method :pre_easy_identified_save!, :save! def save(**options, &block) - if self[:id] == :auto_generate then generate_id(true) end + if self.id == :auto_generate then generate_id(true) end pre_easy_identified_save(**options, &block) end def save!(**options, &block) - if self[:id] == :auto_generate then generate_id(true) end + if self.id == :auto_generate then generate_id(true) end pre_easy_identified_save!(**options, &block) end def generate_id(force_new = false) - if self[:id] == nil || force_new then self[:id] = retrieve_id end + if self.id == nil || force_new then self.id = retrieve_id end end private