Sha256: 7d399c2b897521a876168382d0afca73b5ebff4b8acc536fe2f611bc5da365c7
Contents?: true
Size: 556 Bytes
Versions: 3
Compression:
Stored size: 556 Bytes
Contents
# This controller handles the login/logout function of the site. class Backend::SessionsController < ApplicationController layout "backend" def create self.current_account = Account.authenticate(params[:email], params[:password]) if logged_in? redirect_back_or_default(backend_path) else flash[:notice] = I18n.t("backend.sessions.wrong") redirect_to new_backend_session_path end end def destroy reset_session flash[:notice] = I18n.t("backend.sessions.logout") redirect_back_or_default('/') end end
Version data entries
3 entries across 3 versions & 1 rubygems