Sha256: f92ba90dfb696ffddf8ddf51de1e7796cfc12b981512a070d95b94538597c1d4

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

# frozen_string_literal: true

class SessionsController < ApplicationController
  def new
    @<%= resource_name %> = <%= resource_name.classify %>.new
  end

  def create
    warden.authenticate!(scope: :<%= resource_name %>)
    redirect_to root_url, notice: t('.logged_in')
  end

  def destroy
    warden.logout(:<%=resource_name %>)
    redirect_to root_url, notice: t('.logged_out')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mac_generators-0.3.1 lib/generators/authentication/email/templates/sessions_controller.rb