Title / Description
Code def successful_login(user) session[:logged_in] = true current_user = user redirect_to(admin_path) end def failed_login(message) session[:logged_in] = false session[:user_id] = nil flash.keep[:notice] = message redirect_to(admin_login_path) end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code