ar_pg_array 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ar_pg_array/schema.rb +1 -1
- data/spec/pg_array_spec.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.2
|
data/lib/ar_pg_array/schema.rb
CHANGED
@@ -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].
|
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 )
|
data/spec/pg_array_spec.rb
CHANGED
@@ -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=>[
|
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:
|
4
|
+
hash: 63
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 2
|
10
|
+
version: 0.9.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sokolov Yura aka funny_falcon
|