basic layout template
This commit is contained in:
12
app/controllers/api/customers_controller.rb
Normal file
12
app/controllers/api/customers_controller.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class Api::CustomersController < ActionController::API
|
||||
|
||||
#List all active customers by name
|
||||
def index
|
||||
@customers = Customer.order("name asc")
|
||||
end
|
||||
|
||||
#Show customer by ID
|
||||
def show
|
||||
@customer = Customer.find_by(params[:id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user