Devise::ViewsGenerator
Constants
CONFIRMATIONS_NEW = "<h2>Resend confirmation instructions</h2>\n<form method=\"post\" action=\"<%= __devise_mapping.path_prefix %>/confirmation\">\n <label for=\"user_email\">Email</label>\n <input type=\"email\" name=\"user[email]\" id=\"user_email\" value=\"<%= nested_param(\"user\", \"email\") %>\">\n <button type=\"submit\">Resend confirmation instructions</button>\n</form>"
PASSWORDS_EDIT = "<h2>Change your password</h2>\n<form method=\"post\" action=\"<%= __devise_mapping.path_prefix %>/password\">\n <input type=\"hidden\" name=\"_method\" value=\"patch\">\n <input type=\"hidden\" name=\"user[reset_password_token]\" value=\"<%= params[\"reset_password_token\"] %>\">\n <label for=\"user_password\">New Password</label>\n <input type=\"password\" name=\"user[password]\" id=\"user_password\">\n <label for=\"user_password_confirmation\">Confirm New Password</label>\n <input type=\"password\" name=\"user[password_confirmation]\" id=\"user_password_confirmation\">\n <button type=\"submit\">Change my password</button>\n</form>"
PASSWORDS_NEW = "<h2>Forgot your password?</h2>\n<form method=\"post\" action=\"<%= __devise_mapping.path_prefix %>/password\">\n <label for=\"user_email\">Email</label>\n <input type=\"email\" name=\"user[email]\" id=\"user_email\" value=\"<%= nested_param(\"user\", \"email\") %>\">\n <button type=\"submit\">Send me reset password instructions</button>\n</form>"
REGISTRATIONS_EDIT = "<h2>Edit <%= resource_class %></h2>\n<form method=\"post\" action=\"<%= __devise_mapping.path_prefix %>\">\n <input type=\"hidden\" name=\"_method\" value=\"patch\">\n <label for=\"user_email\">Email</label>\n <input type=\"email\" name=\"user[email]\" id=\"user_email\" value=\"<%= current_user.try(&.attributes[\"email\"]).try(&.to_s) %>\">\n <label for=\"user_password\">Password</label>\n <input type=\"password\" name=\"user[password]\" id=\"user_password\"> <i>(leave blank if you don't want to change it)</i>\n <label for=\"user_password_confirmation\">Password Confirmation</label>\n <input type=\"password\" name=\"user[password_confirmation]\" id=\"user_password_confirmation\">\n <label for=\"user_current_password\">Current Password</label>\n <input type=\"password\" name=\"user[current_password]\" id=\"user_current_password\"> <i>(we need your current password to confirm your changes)</i>\n <button type=\"submit\">Update</button>\n</form>"
REGISTRATIONS_NEW = "<h2>Sign up</h2>\n<%= resource && !resource.errors.empty? ? \"<div class=\\\"alert alert-danger\\\"><ul>#{resource.errors.full_messages.map do |m| "<li>#{m}</li>" end.join}</ul></div>\" : \"\" %>\n<form method=\"post\" action=\"<%= __devise_mapping.path_prefix %>\">\n <label for=\"user_email\">Email</label>\n <input type=\"email\" name=\"user[email]\" id=\"user_email\" value=\"<%= nested_param(\"user\", \"email\") %>\">\n <label for=\"user_password\">Password</label>\n <input type=\"password\" name=\"user[password]\" id=\"user_password\">\n <label for=\"user_password_confirmation\">Password Confirmation</label>\n <input type=\"password\" name=\"user[password_confirmation]\" id=\"user_password_confirmation\">\n <button type=\"submit\">Sign up</button>\n</form>"
SESSIONS_NEW = "<h2>Log in</h2>\n<%= flash[\"alert\"] ? \"<p class=\\\"alert alert-danger\\\">#{flash["alert"]}</p>\" : \"\" %>\n<%= flash[\"notice\"] ? \"<p class=\\\"alert alert-info\\\">#{flash["notice"]}</p>\" : \"\" %>\n<form method=\"post\" action=\"<%= __devise_mapping.path_prefix %>/sign_in\">\n <label for=\"user_email\">Email</label>\n <input type=\"email\" name=\"user[email]\" id=\"user_email\" value=\"<%= nested_param(\"user\", \"email\") %>\">\n <label for=\"user_password\">Password</label>\n <input type=\"password\" name=\"user[password]\" id=\"user_password\">\n <label for=\"user_remember_me\"><input type=\"checkbox\" value=\"1\" name=\"user[remember_me]\" id=\"user_remember_me\"> Remember me</label>\n <button type=\"submit\">Log in</button>\n</form>"
UNLOCKS_NEW = "<h2>Resend unlock instructions</h2>\n<form method=\"post\" action=\"<%= __devise_mapping.path_prefix %>/unlock\">\n <label for=\"user_email\">Email</label>\n <input type=\"email\" name=\"user[email]\" id=\"user_email\" value=\"<%= nested_param(\"user\", \"email\") %>\">\n <button type=\"submit\">Resend unlock instructions</button>\n</form>"
VIEWS = {"sessions/new" => SESSIONS_NEW, "registrations/new" => REGISTRATIONS_NEW, "registrations/edit" => REGISTRATIONS_EDIT, "passwords/new" => PASSWORDS_NEW, "passwords/edit" => PASSWORDS_EDIT, "confirmations/new" => CONFIRMATIONS_NEW, "unlocks/new" => UNLOCKS_NEW}
Constructors
Class methods
Instance methods
generate
Source