Sha256: a4a2e141aeaf613f70ae2b4644fc4b8550a5fbd6cb0ac4103f45931abe7bf39e

Contents?: true

Size: 440 Bytes

Versions: 26

Compression:

Stored size: 440 Bytes

Contents

require_dependency "mtwarden/application_controller"

module Mtwarden
	class Account::SessionsController < Mtwarden::ApplicationController
		def new
			@user = User.new
		end

		def create
			if env["warden"].authenticate(:scope => :user)
				flash[:success] = "You are now signed in."
				redirect_to root_path
			else
				@user = User.new
				flash[:error] = "Invalid email or password."
				render :action => "new"
			end
		end
	end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
mtwarden-17.1.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-17.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-16.2.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-16.1.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-16.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-15.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-14.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-13.0.1 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-13.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-12.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-11.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-9.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-8.1.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-8.0.1 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-8.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-7.2.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-7.1.2 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-7.1.1 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-7.1.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-7.0.0 app/controllers/mtwarden/account/sessions_controller.rb