def unauthenticated(scope=nil)
      constraint = lambda do |request|
        not request.env["warden"].authenticate? :scope => scope
      end

      constraints(constraint) do
        yield
      end
    end
def unauthenticated(scope=nil)
      constraint = lambda do |request|
        not request.env["warden"].authenticate? :scope => scope
      end

      constraints(constraint) do
        yield
      end
    end
Allow you to route based on whether a scope is *not* authenticated.
 You can optionally specify which scope.

   unauthenticated do
     as :user do
       root :to => 'devise/registrations#new'
     end
   end

   root :to => 'dashboard#show'