ar_pg_array 0.9.2 → 0.9.3
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 +1 -1
- data/lib/ar_pg_array/schema.rb +1 -1
- data/spec/pg_array_spec.rb +10 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.3
|
data/lib/ar_pg_array/schema.rb
CHANGED
@@ -232,7 +232,7 @@ module ActiveRecord
|
|
232
232
|
end
|
233
233
|
end
|
234
234
|
|
235
|
-
def add_column_with_postgresql_arrays( table, column, type, options )
|
235
|
+
def add_column_with_postgresql_arrays( table, column, type, options = {} )
|
236
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
|
data/spec/pg_array_spec.rb
CHANGED
@@ -230,5 +230,15 @@ describe "PgArray" do
|
|
230
230
|
end
|
231
231
|
end.should_not raise_error
|
232
232
|
end
|
233
|
+
|
234
|
+
it "should not break other add_column" do
|
235
|
+
lambda do
|
236
|
+
ActiveRecord::Schema.define do
|
237
|
+
add_column :items, :float1, :float
|
238
|
+
add_column :items, :float2, :float, :null=>true
|
239
|
+
add_column :items, :float3, :float, :default=>0, :null=>false
|
240
|
+
end
|
241
|
+
end.should_not raise_error
|
242
|
+
end
|
233
243
|
end
|
234
244
|
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: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 3
|
10
|
+
version: 0.9.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sokolov Yura aka funny_falcon
|