Method: Auther::BaseController#create
- Defined in:
- app/controllers/auther/base_controller.rb
#create ⇒ Object
rubocop:disable Metrics/AbcSize
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/auther/base_controller.rb', line 15 def create @account = Auther::Presenter::Account.new(**account_params.to_h.symbolize_keys) account = Auther::Account[settings.find_account(@account.name)] authenticator = Auther::Authenticator.new settings.secret, account, @account if authenticator.authenticated? store_credentials account redirect_to (account) else remove_credentials account render template: new_template_path end end |