Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class API::PaymentsController < ApplicationController
- before_filter :set_client
- def index
- @foo = @client.foo
- end
- ...
- def set_client
- rescue ActiveRecord::RecordNotFound do |e|
- render json: e.message, status: :not_found
- end
- @client = Client.find(params[:client_id])
- end
- end
Add Comment
Please, Sign In to add comment