зеркало из https://github.com/github/github-ds.git
ensure hash_results is an array on rails 4
Rails 4 changes the return type of select_all from Array to ActiveRecord::Result
This commit is contained in:
Родитель
db1f986607
Коммит
b0772a1cfa
|
@ -297,7 +297,7 @@ module GitHub
|
|||
|
||||
when /\ASELECT/i
|
||||
# Why not execute or select_rows? Because select_all hits the query cache.
|
||||
@hash_results = connection.select_all(query, "#{self.class.name} Select")
|
||||
@hash_results = connection.select_all(query, "#{self.class.name} Select").to_ary
|
||||
@results = @hash_results.map(&:values)
|
||||
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче