Browse files

Really Really fixes dashboard bug

  • Loading branch information...
1 parent ffeea06 commit 40f2a1b5dfaf6061b45c261ce5ae0db90f2dcfbf @kennyadsl committed Apr 2, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/models/rails_admin/history.rb
View
6 app/models/rails_admin/history.rb
@@ -12,10 +12,10 @@ 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 record_count, year, month from rails_admin_histories where month IN (?) and year = ? group by year, month",
- (1..mstop).to_a, ystop])
+ #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)
+ #results.concat(results_two)
else
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 == 12 ? 1 : mstart + 1)..mstop).to_a, ystop])

0 comments on commit 40f2a1b

Please sign in to comment.