update seed generator and remove hard-coded customer id

This commit is contained in:
Thein Lin Kyaw
2019-12-20 10:35:31 +06:30
parent 92e467d512
commit d87ffee65b
32 changed files with 184 additions and 153 deletions

View File

@@ -0,0 +1,18 @@
module Customers
extend ActiveSupport::Concern
included do
helper_method :walkin, :takeaway if respond_to? :helper_method
end
def walkin
return @walkin if defined? @walkin
@walkin = Customer.walkin
end
def takeaway
return @takeaway if defined? @takeaway
@takeaway = Customer.takeaway
end
end