title: Rails engine and devise
body: <p>I have a Rails Engine, where I want to use Devise. I installed devise like normal following <a href="https://github.com/plataformatec/devise/wiki/How-To%3a-Use-devise-inside-a-mountable-engine" rel="nofollow">this guide</a>.</p>
  
  <p>I added this in my engine devise.rb: </p>
  
  <pre><code>Devise.setup do |config|
    config.router_name = :cms_user
  end
  </code></pre>
  
  <p>I added this in my routes file: </p>
  
  <pre><code>Cms::User::Engine.routes.draw do
    devise_for :users, {
      class_name: 'Cms::User',
      module: :devise
    }
  end
  </code></pre>
  
  <p>I added this in my routes:</p>
  
  <pre><code>devise_for :users, {
    class_name: 'Cms::User',
    module: :devise
  }
  </code></pre>
  
  <p>However I keep getting this error: </p>
  
  <pre><code>undefined method 'cms_user'
  </code></pre>
  
  <p>What am I doing wrong ? </p>