Some ROR Code
Ruby
code posted
by
Fred Flintstone
created at 15 Aug 10:42
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 |
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 |
293 Bytes in 7 ms with coderay