passive_model 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb48ebe8a0f354a6ef8ecebbbed4f8257854e09844ad57c5c82fdb09ef42e5ad
4
- data.tar.gz: ea06363924c66cba7055becfc87b21a2fd025bc65f47b35d944797cb52d237ee
3
+ metadata.gz: 63d70aecd10656dd557d28b44362db1a814c81e47df383045a3d54925239c91b
4
+ data.tar.gz: 379998b3f9fab3270f0555a88c2590bc3d6521663b1e04ca0283545a102ee01b
5
5
  SHA512:
6
- metadata.gz: c04ee7e7796735256f9dc3182121c272948a76cd00cee3db28d4812ae4cceaf848ea49f2890bddf16a0dabf47a3c1537287386919997a8ebb2a4b8231ea968b2
7
- data.tar.gz: f06ec4476ae3e822fed9b494fb96a7c4d2d8a7205ecf44e5eeb5bfb99d88af926b67a4ff162d436d8862a38604ad3ac63f69301f661b0a5eb54d2f54ef93ca81
6
+ metadata.gz: b8fc4e1502511f42394dd3db15471897579a457d958f0c149e455991e175c0675b3d7d6a7afbbacc20385d59fe2b6968d526e683e68245b07b291c1b0b817bd9
7
+ data.tar.gz: 2d741c905a880ab2550d0bb5f74344f15f60dcf0e83d1e7cfbd4ee065f884f9054f6ae0a5eaee4a37e4ccbb5ac4a906028007c975653f9fb684d569d2762dd61
@@ -12,6 +12,7 @@ module PassiveModel
12
12
  include ActiveModel::Validations::Callbacks
13
13
  include ActiveModel::Conversion
14
14
  extend ActiveModel::Naming
15
+ extend ActiveModel::Translation
15
16
 
16
17
  def initialize(hash = {})
17
18
  set_attributes(hash)
@@ -46,7 +47,7 @@ module PassiveModel
46
47
 
47
48
  def self.before_save(name)
48
49
  @@before_save_callbacks ||= []
49
- @@before_save_callbacks << name
50
+ @@before_save_callbacks << name unless @@before_save_callbacks.include?(name)
50
51
  end
51
52
 
52
53
  def set_attributes(hash)
@@ -1,3 +1,3 @@
1
1
  module PassiveModel
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passive_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jey Geethan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-01 00:00:00.000000000 Z
11
+ date: 2024-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails