ar_pg_array 0.9.1 → 0.9.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
@@ -233,7 +233,7 @@ module ActiveRecord
233
233
  end
234
234
 
235
235
  def add_column_with_postgresql_arrays( table, column, type, options )
236
- if type.to_s =~ /^(.+)_array$/ && options[:default].presence.is_a?(Array)
236
+ if type.to_s =~ /^(.+)_array$/ && options[:default].is_a?(Array)
237
237
  options = options.merge(:default => prepare_array_for_arel_by_base_type(options[:default], $1))
238
238
  end
239
239
  add_column_without_postgresql_arrays( table, column, type, options )
@@ -224,7 +224,7 @@ describe "PgArray" do
224
224
  lambda do
225
225
  ActiveRecord::Schema.define do
226
226
  change_table :items do |t|
227
- t.integer_array :ints, :default=>[0], :null=>false
227
+ t.integer_array :ints, :default=>[], :null=>false
228
228
  end
229
229
  add_column :items, :floats, :float_array, :default=>[0], :null=>false
230
230
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar_pg_array
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 1
10
- version: 0.9.1
9
+ - 2
10
+ version: 0.9.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sokolov Yura aka funny_falcon