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: 97d6ca8d1bfe05ad56e32d006caecb46e96ce220023490c816942f18a77c57d2
4
- data.tar.gz: 605328d07d556bad95298f038cb33fb7a91903200b87974d1c36747ba9c2f8bc
3
+ metadata.gz: 10795ad02dbbf1ea2033af6b1b36857f0105acf45daa21f44bf576737b838331
4
+ data.tar.gz: e5fb0e9f651127a06d8057a5eeab6934ba62211c9bb9d3f0b8ac6df5e7e5bb58
5
5
  SHA512:
6
- metadata.gz: 305ce148588f05c5a00858ef82e235575434c2760e9d2abf99f6d3be213b875195a81921da1f6590dceab7010d64646245000333982a974c58656bce99364b96
7
- data.tar.gz: 350c358fdf5a3187170ab73ac8ccb831662e3edc041cf6adce85db3023888e6c2336a2141a6f6ff79be1db952fd1d5c46d9acb12026d248b433443690d92137a
6
+ metadata.gz: e738f18a2fe367d7796057fe2f098c6bc5f7291615e4315a78a33f0283df30b7c6c12b26af51b03489112ecd2c2310ac30a5bfac7d29e1c6be26a9700982dc41
7
+ data.tar.gz: 4ccb202176df05c3f9d4882ccd4abf6f025204ffa993b9daa6c3b3b4bcabc06eb22e4f98630253a85c1ef9ce68160b11d6beeb6c6a64ae8f7a885b26e12278ed
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,6 @@
1
+ = 3.6.11.1
2
+ - Fix required attribute broken on previous version when no validation was found
3
+
1
4
  = 3.6.11
2
5
  - Fix inplace edit cloning with jquery >= 1.9, when more than one child is cloned
3
6
  - Support inplace edit cloning for :radio form_ui
@@ -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
 
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 6
5
- PATCH = 11
5
+ PATCH = '11.1'.freeze
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -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.3.7
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