active_scaffold 3.4.0 → 3.4.0.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ff51aa94fbd9816af72b232b8a66ade37aac935
|
4
|
+
data.tar.gz: 1ca9e81926e02e3a057b819b51196d470126baf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fee132f4a758bcd29506196d667fb7d7d3cccae4865b0402e4861866070cff9a57866c18c4422e03976abfc11626dcb1feee51fd3df8f7b4d932293455164e5
|
7
|
+
data.tar.gz: 77033023eafda83e3d48478c2ec8067dc9c2ca49ff72478a0e4dae146cd9b55c1bcbd24d91eeb848a5f269acc4ecee12d5da39038deee5730b3402f7fc5ce602
|
data/CHANGELOG
CHANGED
@@ -70,7 +70,7 @@ class ActiveScaffold::Bridges::RecordSelect
|
|
70
70
|
module SearchColumnHelpers
|
71
71
|
def active_scaffold_search_record_select(column, options)
|
72
72
|
value = field_search_record_select_value(column)
|
73
|
-
active_scaffold_record_select(column, options, value, column.options[:multiple])
|
73
|
+
active_scaffold_record_select(options[:object], column, options, value, column.options[:multiple])
|
74
74
|
end
|
75
75
|
|
76
76
|
def field_search_record_select_value(column)
|
@@ -26,12 +26,10 @@ class ActiveScaffold::Tableless < ActiveRecord::Base
|
|
26
26
|
end
|
27
27
|
|
28
28
|
class Column < ActiveRecord::ConnectionAdapters::Column
|
29
|
-
|
30
|
-
|
29
|
+
if instance_method(:initialize).arity == -4 # rails >= 4.2
|
30
|
+
def initialize(name, default, sql_type = nil, null = true)
|
31
31
|
cast_type = ActiveRecord::Base.connection.send :lookup_cast_type, sql_type
|
32
32
|
super(name, default, cast_type, sql_type, null)
|
33
|
-
else # rails < 4.2
|
34
|
-
super
|
35
33
|
end
|
36
34
|
end
|
37
35
|
end
|
data/test/company.rb
CHANGED
@@ -78,9 +78,9 @@ class AttributeParamsTest < MiniTest::Test
|
|
78
78
|
assert_equal 1, model.number
|
79
79
|
assert_nil model.tenant_id, 'tenant should be cleared'
|
80
80
|
assert_nil model.tenant, 'tenant should be cleared'
|
81
|
-
assert_equal person.id, Floor.find(model).tenant_id, 'floor should not be saved yet'
|
81
|
+
assert_equal person.id, Floor.find(model.id).tenant_id, 'floor should not be saved yet'
|
82
82
|
assert model.save
|
83
|
-
assert_nil Floor.find(model).tenant_id, 'floor should not be saved'
|
83
|
+
assert_nil Floor.find(model.id).tenant_id, 'floor should not be saved'
|
84
84
|
end
|
85
85
|
|
86
86
|
def test_saving_has_one_select
|
@@ -272,9 +272,9 @@ class AttributeParamsTest < MiniTest::Test
|
|
272
272
|
assert_nil model.contactable_type
|
273
273
|
assert_nil model.contactable_id, 'contactable should be cleared'
|
274
274
|
assert_nil model.contactable, 'contactable should be cleared'
|
275
|
-
assert_equal person.id, Contact.find(model).contactable_id, 'contact should not be saved yet'
|
275
|
+
assert_equal person.id, Contact.find(model.id).contactable_id, 'contact should not be saved yet'
|
276
276
|
assert model.save
|
277
|
-
assert_nil Contact.find(model).contactable_id, 'contact should be saved'
|
277
|
+
assert_nil Contact.find(model.id).contactable_id, 'contact should be saved'
|
278
278
|
end
|
279
279
|
|
280
280
|
protected
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.0
|
4
|
+
version: 3.4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Many, see README
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoulda
|