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