13 lines
246 B
Ruby
13 lines
246 B
Ruby
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
|