app/controllers/home_controller.rb in moneyrail-0.1.4 vs app/controllers/home_controller.rb in moneyrail-0.1.5
- old
+ new
@@ -1,10 +1,12 @@
class HomeController < ApplicationController
def index
- @months = []
- collect_months(@months)
- append_current_month(@months)
+ months = []
+ collect_months(months)
+ append_current_month(months)
+
+ @months = months.group_by(&:year)
end
private
def collect_months(months)