mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-06 07:31:31 +00:00
Remove ActiveRecord workaround (#26323).
git-svn-id: http://svn.redmine.org/redmine/trunk@16869 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
216cd861c2
commit
3320e651d3
@ -934,12 +934,7 @@ class Query < ActiveRecord::Base
|
||||
def grouped_query(&block)
|
||||
r = nil
|
||||
if grouped?
|
||||
begin
|
||||
# Rails3 will raise an (unexpected) RecordNotFound if there's only a nil group value
|
||||
r = yield base_group_scope
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
r = {nil => yield(base_scope)}
|
||||
end
|
||||
r = yield base_group_scope
|
||||
c = group_by_column
|
||||
if c.is_a?(QueryCustomFieldColumn)
|
||||
r = r.keys.inject({}) {|h, k| h[c.custom_field.cast_value(k)] = r[k]; h}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user