1
0
mirror of https://github.com/fspc/bike-database.git synced 2025-02-23 09:33:23 -05:00

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

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
app/models/reports.rb Normal file
View File

@ -0,0 +1,5 @@
class Report
def self.bikes_sold_per_year
"KITTIES"
end
end

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

View File

@ -0,0 +1 @@
= @bikes_sold_per_year

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

View File

@ -19,4 +19,5 @@ Bikedb::Application.routes.draw do
get 'ready_for_pickup' => 'freecyclery#ready_for_pickup'
get 'available_bikes' => 'freecyclery#available_bikes'
get 'bikes_sold_per_year' => 'reports#bikes_sold_per_year'
end

View File

@ -14,7 +14,6 @@ mark as picked up from the ready for pickup page
validations around parameters that break site if incomplete
mark as sold should be disabled after bike is sold
there should be nice feedback indicating that the bike was sold
disable new users
Improve form layouts
make navigation always on the left side of the page
Make customer facing bike index with pitchers