diff --git a/app/controllers/freecyclery_controller.rb b/app/controllers/freecyclery_controller.rb index 7d96b1e..a4e36de 100644 --- a/app/controllers/freecyclery_controller.rb +++ b/app/controllers/freecyclery_controller.rb @@ -5,10 +5,6 @@ class FreecycleryController < ApplicationController @closed_applications = Client.closed_applications end - def ready_for_pickup - @bikes_for_pickup = Bike.bikes_ready_for_pickup - end - def available_bikes @available_bikes = Bike.available_for_freecyclery end diff --git a/app/models/bike.rb b/app/models/bike.rb index e124093..963d0e7 100644 --- a/app/models/bike.rb +++ b/app/models/bike.rb @@ -33,10 +33,6 @@ class Bike < ActiveRecord::Base self.client && !client.application_voided && self.date_sold.nil? end - def self.bikes_ready_for_pickup - Bike.all.select{|bike| bike.ready_for_pickup?} - end - def self.available_for_freecyclery assigned_bikes = Client.all.select{|c| !c.bike_id.nil?}.map(&:bike) all_freecyclery_bikes = Bike.order(log_number: :desc).select{|bike| bike.purpose == "Freecyclery"} diff --git a/app/views/freecyclery/ready_for_pickup.html.haml b/app/views/freecyclery/ready_for_pickup.html.haml deleted file mode 100644 index 2891f95..0000000 --- a/app/views/freecyclery/ready_for_pickup.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -.container - %br - - %h1 Freecyclery Bikes for Pickup - %table.table.table-striped.table-bordered.table-hover - %thead - %tr - %th Bike - %th Client - %tbody - - @bikes_for_pickup.each do |bike| - %tr - %td= bike.name - %td= bike.client.name - diff --git a/app/views/static_pages/home.html.haml b/app/views/static_pages/home.html.haml index cd0481d..1ecf33f 100644 --- a/app/views/static_pages/home.html.haml +++ b/app/views/static_pages/home.html.haml @@ -15,8 +15,6 @@ %br = link_to "Freecyclery Agencies", agencies_path %br - = link_to "Freecyclery Bikes Ready for Pickup", ready_for_pickup_path - %br = link_to "Freecyclery Closed Applications", closed_applications_path %br = link_to "Available Bikes", available_bikes_path diff --git a/config/routes.rb b/config/routes.rb index f2c2701..2ccb08e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,7 +21,6 @@ Bikedb::Application.routes.draw do end get 'closed_applications' => 'freecyclery#closed_applications' - 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