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: f45af2d20c0a1737e0bd7a2c7d5d777013c3a77d
4
- data.tar.gz: 6c171bde1438fecf021bafa5a2ff4b8151abd220
3
+ metadata.gz: 7ff51aa94fbd9816af72b232b8a66ade37aac935
4
+ data.tar.gz: 1ca9e81926e02e3a057b819b51196d470126baf1
5
5
  SHA512:
6
- metadata.gz: 003e6d3d878fec9b8de7921dd2d292056eb21af6a1cc599f02016709b12f2bc5de62f5e558efe942873fb5f6915c445c99c4256cbbfb9ec8896163fb267778ab
7
- data.tar.gz: a2e1b1ed3360944f8eadc4d519c9a6cc1a92cf394b658d6990081d2a47c3ade4c623daee33f429c380308ad06a02f08c35caf7f81f11a3ae0cefb778e04e0777
6
+ metadata.gz: 1fee132f4a758bcd29506196d667fb7d7d3cccae4865b0402e4861866070cff9a57866c18c4422e03976abfc11626dcb1feee51fd3df8f7b4d932293455164e5
7
+ data.tar.gz: 77033023eafda83e3d48478c2ec8067dc9c2ca49ff72478a0e4dae146cd9b55c1bcbd24d91eeb848a5f269acc4ecee12d5da39038deee5730b3402f7fc5ce602
data/CHANGELOG CHANGED
@@ -1,4 +1,7 @@
1
- = 3.4.0 (not released yet)
1
+ = 3.4.0.1
2
+ - Fix record_select on field_search
3
+
4
+ = 3.4.0
2
5
  - Support rails4
3
6
  - Quote selected columns
4
7
  - More unobtrusive html views
@@ -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
- def initialize(name, default, sql_type = nil, null = true)
30
- if defined?(ActiveRecord::ConnectionAdapters::Type) # rails >= 4.2
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
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 0
5
+ PATCH = "0.1"
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
data/test/company.rb CHANGED
@@ -5,6 +5,7 @@ class Company < ActiveRecord::Base
5
5
  @with_main_company = with_or_without == :with_main_company
6
6
  @attributes = {}
7
7
  @attributes_cache = {}
8
+ @raw_attributes = {}
8
9
  end
9
10
 
10
11
  def self.columns_hash
@@ -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 00:00:00.000000000 Z
11
+ date: 2014-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda