Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: sferik/rails_admin
...
head fork: sferik/rails_admin
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 1 addition and 5 deletions.
  1. +1 −5 app/models/rails_admin/history.rb
6 app/models/rails_admin/history.rb
View
@@ -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)
@@ -29,10 +29,6 @@ def self.get_history_for_dates(mstart, mstop, ystart, ystop)
((mstart == 12 ? 1 : mstart + 1)..mstop).to_a, ystop])
end
- results.each do |result|
- result.record_count = result.record_count.to_i
- end
-
add_blank_results(results, mstart, ystart)
end

No commit comments for this range

Something went wrong with that request. Please try again.