Ruby on Rails Tuesday, September 1, 2015

On 1 September 2015 at 16:41, Abdulaleem Seyed <lists@ruby-forum.com> wrote:
> I am trying to add bootstrap styling to my rails form_for form. Such
> that I can change the button styling and make the from inline. I tried
> adding doing something like:
>
> <div class="form-group">
> <%= f.submit "Create your account", class: "btn btn-primary" %>
> </div>
>
> However, it did not work. Here is my code in my file.
>
> <%= form_for @subscription do |f| %>
> <%= f.text_field :email %>
> <%= f.submit %>
> <% end %>

One thing to try when odd things are happening is to validate the
html. View the source in the browser, copy the whole text, and paste
it into the validator at https://validator.w3.org/#validate_by_input.
If the html is not valid the browser silently guesses what you mean
and it often guesses incorrectly.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvu58ipxd3AZ-8MeSAtRE%3DGLwRDvc-sDbEE6y7DbYxfAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment