vertica_rails_adapter 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -49,10 +49,10 @@ module ActiveRecord
49
49
 
50
50
 
51
51
  def self.instantiate(record)
52
- record.stringify_keys!
53
-
54
- # sti_class = find_sti_class(record[inheritance_column])
55
- # record_id = sti_class.primary_key && record[sti_class.primary_key]
52
+ record.stringify_keys!
53
+ model = find_sti_class(record[inheritance_column]).allocate
54
+ model.init_with('attributes' => record)
55
+
56
56
  # if ActiveRecord::IdentityMap.enabled? && record_id
57
57
  # if (column = sti_class.columns_hash[sti_class.primary_key]) && column.number?
58
58
  # record_id = record_id.to_i
@@ -64,10 +64,10 @@ module ActiveRecord
64
64
  # IdentityMap.add(instance)
65
65
  # end
66
66
  # else
67
- # instance = sti_class.allocate.init_with('attributes' => record)
67
+ # Kernel.p record
68
68
  # end
69
- # instance
70
69
 
70
+ model
71
71
  end
72
72
  end
73
73
 
@@ -1,3 +1,3 @@
1
1
  module VerticaRailsAdapter
2
- VERSION = "0.0.4"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -4,10 +4,10 @@ version: !ruby/object:Gem::Version
4
4
  hash: 23
5
5
  prerelease:
6
6
  segments:
7
+ - 1
7
8
  - 0
8
9
  - 0
9
- - 4
10
- version: 0.0.4
10
+ version: 1.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sasan Padidar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-28 00:00:00 Z
18
+ date: 2013-02-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :runtime