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 +4 -4
- data/lib/passive_model/base.rb +2 -1
- data/lib/passive_model/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63d70aecd10656dd557d28b44362db1a814c81e47df383045a3d54925239c91b
|
4
|
+
data.tar.gz: 379998b3f9fab3270f0555a88c2590bc3d6521663b1e04ca0283545a102ee01b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8fc4e1502511f42394dd3db15471897579a457d958f0c149e455991e175c0675b3d7d6a7afbbacc20385d59fe2b6968d526e683e68245b07b291c1b0b817bd9
|
7
|
+
data.tar.gz: 2d741c905a880ab2550d0bb5f74344f15f60dcf0e83d1e7cfbd4ee065f884f9054f6ae0a5eaee4a37e4ccbb5ac4a906028007c975653f9fb684d569d2762dd61
|
data/lib/passive_model/base.rb
CHANGED
@@ -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)
|
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.
|
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-
|
11
|
+
date: 2024-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|