Skip to content

Commit

Permalink
added customer index method for controller
Browse files Browse the repository at this point in the history
  • Loading branch information
aruna79 committed May 8, 2018
1 parent 7877cff commit ea1454d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/customers_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class CustomersController < ApplicationController
def index
customers = Customer.all
render json: customers.as_json(only:[:id,:name,:registers_at,:postal_code,:phone,:methods=>[:movies_checked_out_count]])
end
end

0 comments on commit ea1454d

Please sign in to comment.