Class: Monban::Constraints::SignedOut
- Inherits:
-
Object
- Object
- Monban::Constraints::SignedOut
- Defined in:
- lib/monban/constraints/signed_out.rb
Overview
Rails route constraint for signed out users
Instance Method Summary collapse
-
#matches?(request) ⇒ Boolean
Checks to see if the constraint is matched by not having a user signed in.
Instance Method Details
#matches?(request) ⇒ Boolean
Checks to see if the constraint is matched by not having a user signed in
8 9 10 11 |
# File 'lib/monban/constraints/signed_out.rb', line 8 def matches?(request) warden = request.env["warden"] warden && warden.unauthenticated? end |