has_unique_attribute 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e56c6790f8382532f9e3a9ba01dfe2ef29bb2b9c6bf7f4b1059bdf4ba4e432df
4
- data.tar.gz: 48d102170b5893bb8f5d48691cd0fdb2a85a3f220e3db563c9d470d1b6d09867
3
+ metadata.gz: 2cb4f16d85b2c9337c307e504d6b8305bb4dcedb89c51ae9ba07824351cb3bb8
4
+ data.tar.gz: 3a3a05fa55d6212192f80e28e240c93ef05fffb3b5d19749b3b9112c779af214
5
5
  SHA512:
6
- metadata.gz: f7f945cd1a46a33446bf41eb2479732edabf96a85324f3a4285d356aee6d62edc3ce699656b1690126dbdefeeb5bcc5b6ca5252f3fdcff648df05d21682c5862
7
- data.tar.gz: 885ffb6b352c232c7bae350ef997cd374174783e199448e240644dd33b90087f212beba5b805083581cbb247f0cec21bf7605ffd91e4b7fbc880571aa22eb514
6
+ metadata.gz: 74822da50a7341ba65310ed9b3a190c9837962fdc5c5499cbd2e17a3ed64907a50548656289699ab98dbe00ebb5637d2cff37c2821747d1e4d350b4b8f6c5826
7
+ data.tar.gz: 06cfae3160fc109e51eef9d25eda0cc5cb939538460c5e71e44d3f4aa77e8e0c976b59820324fbd26a549925d1c1cd73add67722077fe7133af2f05717732591
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- has_unique_attribute (0.1.2)
4
+ has_unique_attribute (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -58,8 +58,8 @@ private
58
58
  def handle_unique_attribute_on_save!(attribute_name, index_name, message)
59
59
  existing_method = instance_method(:save!)
60
60
 
61
- define_method(:save!) do |*args|
62
- existing_method.bind(self).call(*args)
61
+ define_method(:save!) do |*args, **kwargs|
62
+ existing_method.bind(self).call(*args, **kwargs)
63
63
  rescue ActiveRecord::RecordNotUnique => error
64
64
  if error.message.include?(index_name)
65
65
  errors.add(attribute_name, message)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HasUniqueAttribute
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_unique_attribute
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mihail-K
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-26 00:00:00.000000000 Z
11
+ date: 2021-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler