activerecord-postgres-array 0.0.1 → 0.0.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.
@@ -1,6 +1,4 @@
1
1
  require 'rails'
2
- require 'rails/generators'
3
- require 'rails/generators/migration'
4
2
 
5
3
  class ActiveRecordPostgresArray < Rails::Railtie
6
4
 
@@ -44,8 +44,8 @@ module ActiveRecord
44
44
  class PostgreSQLColumn < Column
45
45
  # Does the type casting from array columns using String#from_postgres_array or Array#from_postgres_array.
46
46
  def type_cast_code_with_array(var_name)
47
- if type =~ /_array$/
48
- base_type = type.gsub(/_array/, '')
47
+ if type.to_s =~ /_array$/
48
+ base_type = type.to_s.gsub(/_array/, '')
49
49
  "#{var_name}.from_postgres_array(:#{base_type})"
50
50
  else
51
51
  type_cast_code_without_array(var_name)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgres-array
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tim Connor
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-14 00:00:00 +12:00
18
+ date: 2011-04-15 00:00:00 +12:00
19
19
  default_executable:
20
20
  dependencies: []
21
21