Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added warden authentication example to resque-web rails 3 instruction…

…s (slightly modified version of https://gist.github.com/1575082, by https://github.com/cwise)
  • Loading branch information...
commit c469f51717aba526d0c17f429917ff36818e0299 1 parent 68f8a68
Daniel Nelson authored steveklabnik committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.markdown
View
12 README.markdown
@@ -501,6 +501,18 @@ You can also mount Resque on a subpath in your existing Rails 3 app by adding `r
mount Resque::Server.new, :at => "/resque"
```
+If you use Devise, the following will integrate with your existing admin authentication (assuming you have an Admin Devise scope):
+
+``` ruby
+resque_constraint = lambda do |request|
+ request.env['warden'].authenticate!({ :scope => :admin })
+end
+constraints resque_constraint do
+ mount Resque::Server.new, :at => "/resque"
+end
+```
+
+
Resque vs DelayedJob
--------------------

0 comments on commit c469f51

Please sign in to comment.
Something went wrong with that request. Please try again.