WIP - begin adding reports

This commit is contained in:
Loos
2014-11-03 20:26:55 -05:00
parent 34d4cf27c7
commit f7de4ea77a
7 changed files with 25 additions and 4 deletions
+8
View File
@@ -0,0 +1,8 @@
class ReportsController < ApplicationController
before_action :authenticate_user!
def bikes_sold_per_year
@bikes_sold_per_year = Report.bikes_sold_per_year
end
end
+5
View File
@@ -0,0 +1,5 @@
class Report
def self.bikes_sold_per_year
"KITTIES"
end
end
+7 -3
View File
@@ -1,6 +1,10 @@
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# :confirmable, :lockable, :timeoutable, :omniauthable, :registerable,
devise :database_authenticatable,
:recoverable,
:rememberable,
:trackable,
:validatable
end
@@ -0,0 +1 @@
= @bikes_sold_per_year
+3
View File
@@ -18,3 +18,6 @@
= link_to "Freecyclery Closed Applications", closed_applications_path
%br
= link_to "Available Bikes", available_bikes_path
%h2 Reports
%br
= link_to "Bikes Sold Per Year", bikes_sold_per_year_path