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:
parent
34d4cf27c7
commit
f7de4ea77a
8
app/controllers/reports_controller.rb
Normal file
8
app/controllers/reports_controller.rb
Normal 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
5
app/models/reports.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class Report
|
||||
def self.bikes_sold_per_year
|
||||
"KITTIES"
|
||||
end
|
||||
end
|
@ -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
|
||||
|
1
app/views/reports/bikes_sold_per_year.html.haml
Normal file
1
app/views/reports/bikes_sold_per_year.html.haml
Normal file
@ -0,0 +1 @@
|
||||
= @bikes_sold_per_year
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user