client_side_validations-mongo_mapper 0.11.0.beta.1 → 0.11.0.rc.1
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.
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.require_paths = ['lib']
|
14
14
|
gem.version = ClientSideValidations::MongoMapper::VERSION
|
15
15
|
|
16
|
-
gem.add_dependency 'client_side_validations', '~> 3.2.0.
|
16
|
+
gem.add_dependency 'client_side_validations', '~> 3.2.0.rc.1'
|
17
17
|
gem.add_dependency 'mongo_mapper', '~> 0.11'
|
18
18
|
|
19
19
|
gem.add_development_dependency 'bson_ext'
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module ClientSideValidations::MongoMapper
|
2
2
|
module Uniqueness
|
3
|
-
def client_side_hash(model, attribute)
|
3
|
+
def client_side_hash(model, attribute, force = nil)
|
4
4
|
hash = {}
|
5
5
|
hash[:message] = model.errors.generate_message(attribute, message_type, options.except(:scope))
|
6
6
|
hash[:case_sensitive] = options[:case_sensitive] if options.key?(:case_sensitive)
|
7
|
+
hash[:allow_blank] = options[:allow_blank] if options.key?(:allow_blank)
|
7
8
|
hash[:id] = model.id unless model.new_record?
|
8
9
|
if options.key?(:scope) && options[:scope].present?
|
9
10
|
hash[:scope] = Array.wrap(options[:scope]).inject({}) do |scope_hash, scope_item|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: client_side_validations-mongo_mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.0.
|
4
|
+
version: 0.11.0.rc.1
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: client_side_validations
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2.0.
|
21
|
+
version: 3.2.0.rc.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.2.0.
|
29
|
+
version: 3.2.0.rc.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: mongo_mapper
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,6 +196,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
196
|
- - ! '>='
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
|
+
segments:
|
200
|
+
- 0
|
201
|
+
hash: 931085249334034984
|
199
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
203
|
none: false
|
201
204
|
requirements:
|