Created
September 7, 2018 14:01
-
-
Save 9876691/fa2d20b7d87c990979dd1ac62789a30d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SignIns::NewPage < GuestLayout | |
needs form : SignInForm | |
def content | |
h1 "Sign In" | |
render_sign_in_form(@form) | |
end | |
private def render_sign_in_form(f) | |
form_for SignIns::Create do | |
sign_in_fields(f) | |
submit "Sign In", flow_id: "sign-in-button" | |
end | |
link "Reset password", to: PasswordResetRequests::New | |
text " | " | |
link "Sign up", to: SignUps::New | |
end | |
private def sign_in_fields(f) | |
field(f.email) { |i| email_input i, autofocus: "true" } | |
field(f.password) { |i| password_input i } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment