Module: Login::Helper
Instance Method Summary collapse
Instance Method Details
#current_user ⇒ Object
11 12 13 |
# File 'lib/vanilla/dynasnips/login.rb', line 11 def current_user app.request.session['logged_in_as'] end |
#logged_in? ⇒ Boolean
7 8 9 |
# File 'lib/vanilla/dynasnips/login.rb', line 7 def logged_in? !current_user.nil? end |
#login_required ⇒ Object
15 16 17 |
# File 'lib/vanilla/dynasnips/login.rb', line 15 def login_required "You need to <a href='/login'>login</a> to do that." end |