We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 43e7f36 + c6080e1 commit 7e8dd76Copy full SHA for 7e8dd76
lib/postgresql_cursor/cursor.rb
@@ -110,12 +110,7 @@ def each_array(&block)
110
def each_instance(klass=nil, &block)
111
klass ||= @type
112
self.each_tuple do |row|
113
- if ::ActiveRecord::VERSION::MAJOR < 4
114
- model = klass.send(:instantiate,row)
115
- else
116
- @column_types ||= column_types
117
- model = klass.send(:instantiate, row, @column_types)
118
- end
+ klass.send(:instantiate, row)
119
block.call(model)
120
end
121
@@ -144,12 +139,7 @@ def each_instance_batch(klass=nil, &block)
144
139
145
140
self.each_batch do |batch|
146
141
models = batch.map do |row|
147
148
- model = klass.send(:instantiate, row)
149
150
151
152
142
153
143
154
block.call(models)
155
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments