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-6.1.2 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-6.1.1 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-6.1.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-6.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-5.0.0 app/controllers/mtwarden/account/sessions_controller.rb
mtwarden-5.0.0b app/controllers/mtwarden/account/sessions_controller.rb