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