Class: Debci::AuthApp
Direct Known Subclasses
Constant Summary
Constants included from HTMLHelpers
Instance Method Summary collapse
Methods inherited from App
#get_page_params, get_page_range, #get_page_range, #pagination_params, #refresh!
Methods included from HTMLHelpers
#expand_pin_packages, #expand_url, #file_link, #history_url, #icon, #package_url, #title_test_trigger_pin
Instance Method Details
#authenticate! ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/debci/auth_app.rb', line 9 def authenticate! @user = Debci::User.find(session[:user_id]) rescue ActiveRecord::RecordNotFound session[:original_url] = request.path redirect('/user/login') halt end |
#forbidden ⇒ Object
17 18 19 |
# File 'lib/debci/auth_app.rb', line 17 def forbidden halt 403, erb(:forbidden) end |