activerecord-postgres-array 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -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:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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-
|
18
|
+
date: 2011-04-15 00:00:00 +12:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|