Files
sx-fc/app/controllers/api/customers_controller.rb
2017-04-05 08:24:21 +06:30

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