title: devise 2 models 2 views problem with path
body: <p><strong>context</strong>:</p>
  <blockquote>
  <p><em>rails</em> 3.0.3</p>
  <p><em>devise</em>  1.1.5 and 1.2rc</p>
  </blockquote>
  <p>i have following devise rdoc</p>
  <pre><code>rails g devise:install
  
  rails g devise user
  
  rails g devise employee
  
  rails g devise:views users
  
  rails g devise:views employees
  </code></pre>
  <p>routes.rb</p>
  <blockquote>
  <p>devise_for :users</p>
  <p>devise_for :employees, :path =&gt; 'admin'</p>
  </blockquote>
  <p>devise.rb</p>
  <blockquote>
  <p>config.scoped_views = true</p>
  </blockquote>
  <p>rake routes gives</p>
  <blockquote>
  <p>new_user_session GET    /users/sign_in(.:format)                                        {:action=&gt;&quot;new&quot;, :controller=&gt;&quot;devise/sessions&quot;}</p>
  <pre><code>                user_session POST   /users/sign_in(.:format)                        {:action=&gt;&quot;create&quot;, :controller=&gt;&quot;devise/sessions&quot;}
  
          destroy_user_session GET    /users/sign_out(.:format)                       {:action=&gt;&quot;destroy&quot;, :controller=&gt;&quot;devise/sessions&quot;}
  
                 user_password POST   /users/password(.:format)                       {:action=&gt;&quot;create&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  
             new_user_password GET    /users/password/new(.:format)                   {:action=&gt;&quot;new&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  
            edit_user_password GET    /users/password/edit(.:format)                  {:action=&gt;&quot;edit&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  
                               PUT    /users/password(.:format)                       {:action=&gt;&quot;update&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  
                   user_unlock POST   /users/unlock(.:format)                         {:action=&gt;&quot;create&quot;, :controller=&gt;&quot;devise/unlocks&quot;}
  
               new_user_unlock GET    /users/unlock/new(.:format)                     {:action=&gt;&quot;new&quot;, :controller=&gt;&quot;devise/unlocks&quot;}
  
                               GET    /users/unlock(.:format)                         {:action=&gt;&quot;show&quot;, :controller=&gt;&quot;devise/unlocks&quot;}
  
          new_employee_session GET    /admin/sign_in(.:format)                        {:action=&gt;&quot;new&quot;, :controller=&gt;&quot;devise/sessions&quot;}
  
              employee_session POST   /admin/sign_in(.:format)                        {:action=&gt;&quot;create&quot;, :controller=&gt;&quot;devise/sessions&quot;}
  
      destroy_employee_session GET    /admin/sign_out(.:format)                       {:action=&gt;&quot;destroy&quot;, :controller=&gt;&quot;devise/sessions&quot;}
  
             employee_password POST   /admin/password(.:format)                       {:action=&gt;&quot;create&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  
         new_employee_password GET    /admin/password/new(.:format)                   {:action=&gt;&quot;new&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  
        edit_employee_password GET    /admin/password/edit(.:format)                  {:action=&gt;&quot;edit&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  
                               PUT    /admin/password(.:format)                       {:action=&gt;&quot;update&quot;, :controller=&gt;&quot;devise/passwords&quot;}
  </code></pre>
  </blockquote>
  <p>a mailer views  users or employees are</p>
  <p><code>link_to 'Change my password', edit_user_password_url(@resource, :reset_password_token =&gt; @resource.reset_password_token)</code></p>
  <p><code>link_to 'Change my password', edit_employee_password_url(@resource, :reset_password_token =&gt; @resource.reset_password_token)</code></p>
  <p>But if i submit form i have this error (<em>for user or employee</em>)</p>
  <blockquote>
  <p>TypeError in Devise/passwords#create</p>
  <p>Showing /app/views/users/mailer/reset_password_instructions.html.erb where line #8 raised:</p>
  <p>can't convert String into Hash</p>
  <p>8: &lt;%= link_to 'Change my password', edit_employee_password_url(@resource, :reset_password_token =&gt; @resource.reset_password_token) %&gt;</p>
  </blockquote>
  <p>if you have an idea ?</p>