mongoid-normalize-strings 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 9b9be0339d3e3d5e725d876319b9f7e0edaea3fd
4
- data.tar.gz: 747ecbfb2499bbf8f4c87e9855917170e365c185
3
+ metadata.gz: 5c8f5b946c31422dd72bf60ffd097e05579a4288
4
+ data.tar.gz: 48cb794dbf043c995209ad4385c4af11e6a65a0c
5
5
  SHA512:
6
- metadata.gz: 7aa5176a0c512f6ecb87bea7ba82c45d60fb4657b3d2656ab227ce6b597d30f7875dec3667c6cb6241efb6e87f2bd8747d9f051ddc4c9daa7c59edd04f1478a5
7
- data.tar.gz: e172ac25a50d3dc73a457c5104e0c7d5120a2d9d36bbb2a4b1de8a8577edbb63443e234487d682d07adc86fc8fa9ef29fc46d66a678a677785d1b89553af8a6a
6
+ metadata.gz: d12f769ee48c5985f1117d0f2fbf56834ab4e630a06dee577961178a190e6c1c59817ee55e5c3a3d13d122166ef86b4bdab0cff5d9e1e743708e66999b37dcdf
7
+ data.tar.gz: f77e99f99e9ed7c68fad1fa6043b5a6b66157d0977f237bbf67c01da48ce7550596ac534dd408a2c4edb74ac3e39a9c9d6b7901db716636016022738fab03581
@@ -34,7 +34,7 @@ module Mongoid
34
34
  base.extend(ClassMethods)
35
35
 
36
36
  ## Save normalized field value
37
- base.send(:before_save) do
37
+ base.send(:before_validation) do
38
38
  self.class.normalized_fields.each do |field_name|
39
39
  if self[field_name]
40
40
  self["#{field_name}_normalized"] = I18n.transliterate(self[field_name]).downcase
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module NormalizeStrings
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-normalize-strings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Jurado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.4.5.1
122
+ rubygems_version: 2.5.2
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Normalize fields of type string in your Mongoid models.