Sha256: 687b5d8264e57526b525e6bf700f429a4d05d84a68ffea8ed88c34adf54bd387
Contents?: true
Size: 560 Bytes
Versions: 37
Compression:
Stored size: 560 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
37 entries across 37 versions & 1 rubygems