Skip to content

How To: Display a custom sign_in form anywhere in your app

trevorturk edited this page Sep 20, 2010 · 11 revisions

It’s easy to create a custom login form that can be used anywhere in your application.

Here’s an example in HAML:

= form_tag new_user_session_path do
  = text_field_tag 'user[email]'
  = password_field_tag 'user[password]'
  %button Login

Note: “user” in this context is the resource you specified when setting up Devise.

Clone this wiki locally