Skip to content

Commit

Permalink
force history number to int to solve dashboard error
Browse files Browse the repository at this point in the history
  • Loading branch information
federomero authored and sferik committed Dec 9, 2010
1 parent ede9f6f commit 171055a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/rails_admin/history.rb
Expand Up @@ -46,6 +46,10 @@ def self.get_history_for_dates(mstart, mstop, ystart, ystop)
results = History.find_by_sql("select count(*) as number, year, month from histories where month IN (#{sql_in}) and year = #{ystart} group by year, month")
end

results.each do |result|
result.number = result.number.to_i
end

add_blank_results(results, mstart, ystart)
end

Expand Down

0 comments on commit 171055a

Please sign in to comment.