Skip to content

Commit

Permalink
Fixed rails_admin/issues#913 thanks @alecslupu!
Browse files Browse the repository at this point in the history
  • Loading branch information
gunn committed Mar 26, 2013
1 parent d486d08 commit 9746b48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/rails_admin/history.rb
Expand Up @@ -20,7 +20,7 @@ def self.get_history_for_dates(mstart, mstop, ystart, ystop)
if mstart > mstop && mstart < 12
results = History.find_by_sql(["select count(*) as record_count, year, month from rails_admin_histories where month IN (?) and year = ? group by year, month",
((mstart + 1)..12).to_a, ystart])
results_two = History.find_by_sql(["select count(*) as number, year, month from rails_admin_histories where month IN (?) and year = ? group by year, month",
results_two = History.find_by_sql(["select count(*) as record_count, year, month from rails_admin_histories where month IN (?) and year = ? group by year, month",
(1..mstop).to_a, ystop])

results.concat(results_two)
Expand Down

0 comments on commit 9746b48

Please sign in to comment.