active_scaffold 3.6.11 → 3.6.11.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10795ad02dbbf1ea2033af6b1b36857f0105acf45daa21f44bf576737b838331
|
4
|
+
data.tar.gz: e5fb0e9f651127a06d8057a5eeab6934ba62211c9bb9d3f0b8ac6df5e7e5bb58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e738f18a2fe367d7796057fe2f098c6bc5f7291615e4315a78a33f0283df30b7c6c12b26af51b03489112ecd2c2310ac30a5bfac7d29e1c6be26a9700982dc41
|
7
|
+
data.tar.gz: 4ccb202176df05c3f9d4882ccd4abf6f025204ffa993b9daa6c3b3b4bcabc06eb22e4f98630253a85c1ef9ce68160b11d6beeb6c6a64ae8f7a885b26e12278ed
|
data/CHANGELOG.rdoc
CHANGED
@@ -361,7 +361,7 @@ module ActiveScaffold::DataStructures
|
|
361
361
|
.map { |val| validator_force_required?(val) }
|
362
362
|
.select(&:present?)
|
363
363
|
self.required = validators_force_require_on.any? { |opt| opt == true } ||
|
364
|
-
validators_force_require_on.reject { |opt| opt == true }.flatten
|
364
|
+
validators_force_require_on.reject { |opt| opt == true }.flatten.presence
|
365
365
|
self.sort = true
|
366
366
|
self.search_sql = true
|
367
367
|
|
@@ -9,6 +9,16 @@ class ValidationReflectionTest < MiniTest::Test
|
|
9
9
|
assert column.required?
|
10
10
|
end
|
11
11
|
|
12
|
+
def test_set_required_for_validates_presence_of_with_on
|
13
|
+
column = ActiveScaffold::DataStructures::Column.new(:name, Company)
|
14
|
+
refute column.required?
|
15
|
+
Company.expects(:validators_on).with(:name).returns([ActiveModel::Validations::PresenceValidator.new(:attributes => :name, :on => [:create])])
|
16
|
+
column = ActiveScaffold::DataStructures::Column.new(:name, Company)
|
17
|
+
assert column.required?
|
18
|
+
assert column.required?(:create)
|
19
|
+
refute column.required?(:update)
|
20
|
+
end
|
21
|
+
|
12
22
|
def test_set_required_for_validates_inclusion_of
|
13
23
|
column = ActiveScaffold::DataStructures::Column.new(:name, Company)
|
14
24
|
refute column.required?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.11
|
4
|
+
version: 3.6.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Many, see README
|
@@ -477,7 +477,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
477
477
|
- !ruby/object:Gem::Version
|
478
478
|
version: '0'
|
479
479
|
requirements: []
|
480
|
-
rubygems_version: 3.
|
480
|
+
rubygems_version: 3.0.9
|
481
481
|
signing_key:
|
482
482
|
specification_version: 4
|
483
483
|
summary: Rails 4.x and 5.x versions of ActiveScaffold supporting prototype and jquery
|