Sha256: 821341ac7e4bfa35fa0ceb5711d8f211f35e06c8d469011d12ffa3ef978cd5f0
Contents?: true
Size: 631 Bytes
Versions: 6
Compression:
Stored size: 631 Bytes
Contents
module Nyauth class RegistrationsController < Nyauth::BaseController allow_everyone before_action :set_service def new end def create sign_in(@service.client) if @service.save(as: nyauth_client_name) respond_with @service, location: Nyauth.configuration.redirect_path_after_registration.call(nyauth_client_name) || main_app.root_path end private def set_service @service = Nyauth::Registration.new(registration_params) end def registration_params params.fetch(:registration, {}) .permit(:email, :password, :password_confirmation) end end end
Version data entries
6 entries across 6 versions & 1 rubygems