activerecord-postgres-hstore 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "activerecord-postgres-hstore"
7
- s.version = "0.7.4"
7
+ s.version = "0.7.5"
8
8
 
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.license = "MIT"
@@ -67,6 +67,23 @@ module ActiveRecord
67
67
  end
68
68
 
69
69
  module ConnectionAdapters
70
+ class PostgreSQLColumn < Column
71
+ # Adds the hstore type for the column.
72
+ def simplified_type_with_hstore(field_type)
73
+ field_type == 'hstore' ? :hstore : simplified_type_without_hstore(field_type)
74
+ end
75
+
76
+ alias_method_chain :simplified_type, :hstore
77
+ end
78
+
79
+ class PostgreSQLAdapter < AbstractAdapter
80
+ def native_database_types_with_hstore
81
+ native_database_types_without_hstore.merge({:hstore => { :name => "hstore" }})
82
+ end
83
+
84
+ alias_method_chain :native_database_types, :hstore
85
+ end
86
+
70
87
  module SchemaStatements
71
88
 
72
89
  # Installs hstore by creating the Postgres extension
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgres-hstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-12 00:00:00.000000000 Z
13
+ date: 2013-02-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord