update seed generator and remove hard-coded customer id
This commit is contained in:
18
app/controllers/concerns/customers.rb
Normal file
18
app/controllers/concerns/customers.rb
Normal 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
|
||||
Reference in New Issue
Block a user