title: How to programmatically list all devise routes
body: <p>I'm using devise to authenticate my users in my Rails 4.1.9 application.</p>
  
  <p>I need to list all devise routes in a javascript file.</p>
  
  <p>I tried to do something like this:</p>
  
  <pre><code>all_routes = Rails.application.routes.routes.map do |route|
      route.path.spec.to_s.gsub('(.:format)', '')
  end
  </code></pre>
  
  <p>This simply prints all rails routes. How can I get only devise ones?</p>
  
  <p>I tried to check the controllers, but I don't know how to do...</p>