Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The easiest way is to generate new views and customize them by adding the styles and markup from your old views.</p> <p>Or see a sample app and copy the forms needed into you existing views, for example:</p> <p>For a sign in page (new session) devise generates this code</p> <p>In <strong>app/views/devise/sessions/new.html.erb</strong> </p> <pre><code>&lt;h2&gt;Sign in&lt;/h2&gt; &lt;%= form_for(resource, :as =&gt; resource_name, :url =&gt; session_path(resource_name)) do |f| %&gt; &lt;div&gt;&lt;%= f.label :email %&gt;&lt;br /&gt; &lt;%= f.email_field :email %&gt;&lt;/div&gt; &lt;div&gt;&lt;%= f.label :password %&gt;&lt;br /&gt; &lt;%= f.password_field :password %&gt;&lt;/div&gt; &lt;% if devise_mapping.rememberable? -%&gt; &lt;div&gt;&lt;%= f.check_box :remember_me %&gt; &lt;%= f.label :remember_me %&gt;&lt;/div&gt; &lt;% end -%&gt; &lt;div&gt;&lt;%= f.submit "Sign in" %&gt;&lt;/div&gt; &lt;% end %&gt; &lt;%= render "devise/shared/links" %&gt; </code></pre> <p>So I would say the best option is to generate them, and copy the code in your views to the ones generated by devise or copy the devise generated code into your views (the first option is better because it keeps the default devise routing) and you dont need to map the devise controllers to your custom views.</p> <p>If you <strong>really need</strong> to use your old views just add the corresponding form and fields, and have the devise controller map to your corresponding views, <strong>it's more complicated this way</strong> but it can be done, read: <a href="https://github.com/plataformatec/devise#configuring-controllers" rel="nofollow">https://github.com/plataformatec/devise#configuring-controllers</a> for further info.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload