postgres_ext 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,15 +7,16 @@ module ActiveRecord
7
7
  class PostgreSQLColumn
8
8
  include PgArrayParser
9
9
  attr_accessor :array
10
- def initialize(name, default, sql_type = nil, null = true)
10
+ def initialize_with_extended_types(name, default, sql_type = nil, null = true)
11
11
  if sql_type =~ /\[\]$/
12
12
  @array = true
13
13
  super(name, default, sql_type[0..sql_type.length - 3], null)
14
14
  @sql_type = sql_type
15
15
  else
16
- super
16
+ initialize_without_extended_types(name,default, sql_type, null)
17
17
  end
18
18
  end
19
+ alias_method_chain :initialize, :extended_types
19
20
  def klass_with_extended_types
20
21
  case type
21
22
  when :inet, :cidr then IPAddr
@@ -1,3 +1,3 @@
1
1
  module PostgresExt
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgres_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -260,7 +260,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
260
  version: '0'
261
261
  segments:
262
262
  - 0
263
- hash: -161966388102322478
263
+ hash: 3081454126221361609
264
264
  required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  none: false
266
266
  requirements:
@@ -269,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  version: '0'
270
270
  segments:
271
271
  - 0
272
- hash: -161966388102322478
272
+ hash: 3081454126221361609
273
273
  requirements: []
274
274
  rubyforge_project:
275
275
  rubygems_version: 1.8.23