From a58569a1a86cb8b2b36e55fa1b5326fb8a0db7b6 Mon Sep 17 00:00:00 2001 From: Louis Knapp Date: Sat, 10 Oct 2015 12:24:03 -0500 Subject: [PATCH] lk | bike name includes color & log number --- app/models/bike.rb | 2 +- config/initializers/date_time.rb | 5 +++++ notes.txt | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 config/initializers/date_time.rb diff --git a/app/models/bike.rb b/app/models/bike.rb index 5ce280d..0722e27 100644 --- a/app/models/bike.rb +++ b/app/models/bike.rb @@ -7,7 +7,7 @@ class Bike < ActiveRecord::Base validates :serial_number, presence: true def name - self.brand + ' ' + self.model + self.color + " " + self.brand + ' ' + self.model + " (" + self.log_number.to_s + ")" end def client diff --git a/config/initializers/date_time.rb b/config/initializers/date_time.rb new file mode 100644 index 0000000..16729a2 --- /dev/null +++ b/config/initializers/date_time.rb @@ -0,0 +1,5 @@ +# Date +Date::DATE_FORMATS[:default] = "%m/%d/%Y" + +# Time +Time::DATE_FORMATS[:default] = "%m/%d/%Y" diff --git a/notes.txt b/notes.txt index 63009f4..be08917 100644 --- a/notes.txt +++ b/notes.txt @@ -1,3 +1,10 @@ +print sales labels should not show freecyclery bikes + +show log number next to bikes (color model make lognumber) + + + + search for bike based on log # convert to bootstrap-less or something