Skip to content

Instantly share code, notes, and snippets.

@groony
Created July 2, 2018 10:15
Show Gist options
  • Save groony/fe11e197a7eb28afb9569b5c6efb7790 to your computer and use it in GitHub Desktop.
Save groony/fe11e197a7eb28afb9569b5c6efb7790 to your computer and use it in GitHub Desktop.
controller example
module Api
module V1
class SsoController < ApiController
before_action :authenticate
def show
service = ::Sso::Show.new(params_h.merge(current_user: current_user))
service.execute!
if service.success?
render json: ::V1::SsoSerializer.new(current_user)
else
render_errors(service.errors)
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment