Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
  2. <div><%= f.label :email %><br />
  3. <%= f.email_field :email, autofocus: true %></div>
  4. <div><%= f.label :password %><br />
  5. <%= f.password_field :password, autocomplete: "off" %></div>
  6. <div><%= f.submit "Sign in" %></div>
  7. <% end %>
  8.  
  9. module ApplicationHelper
  10. def resource_name
  11. :user
  12. end
  13.  
  14. def resource
  15. @resource ||= User.new
  16. end
  17.  
  18. def devise_mapping
  19. @devise_mapping ||= Devise.mappings[:user]
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement