Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devise Forms Lacking Button Classes #9

keytonw opened this Issue Apr 12, 2019 · 1 comment


None yet
2 participants
Copy link

keytonw commented Apr 12, 2019

CAVEAT: I'm new to rails but am an experienced flask/django coder...

When I ran this:

rails generate devise:views

My app/views/devise/registration/new.html.erb looks like this (haven't added username yet):

<h2>Sign up</h2>

<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
  <%= f.error_notification %>

  <div class="form-inputs">
    <%= f.input :email,
                required: true,
                autofocus: true,
                input_html: { autocomplete: "email" }%>
    <%= f.input :password,
                required: true,
                hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
                input_html: { autocomplete: "new-password" } %>
    <%= f.input :password_confirmation,
                required: true,
                input_html: { autocomplete: "new-password" } %>

  <div class="form-actions">
    <%= f.button :submit, "Sign up" %>
<% end %>

<%= render "devise/shared/links" %>

NOTE lack of button class on the submit button....

As a result, I am not seeing the proper button styling on my buttons. Not a huge thing but unexpected (and different from your screenshots).

Was this something you added manually or was my simple_form different from yours somehow (I've confirmed our gemfile.lock looks the same etc.

Seems like the simple_form should be handling this bootstrap add-on?

I've started over twice to confirm it wasn't a mistype.

Mostly I just want to make sure that I've not done something wrong or that I misunderstand what simple_form should be doing for me.

Thank you!


This comment has been minimized.

Copy link

iridakos commented Apr 12, 2019

Hi @keytonw, thank you very much for pointing this out. You are absolutely right. I forgot to mention this step. Post updated. 👍 👍

@iridakos iridakos closed this Apr 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.