5

I am trying out development on Ruby on Rails and I am creating a form using form_for helper:

 <%= form_for(:session, url: login_path) , :html => {:class => "formsignin"} do |f| %>

I am trying to add my own custom class formsignin but this does not work.

1

1 Answer 1

14

:html option is an argument to form_for helper, you've closed form_for method call too early! Reference documentation for form_for.

Try the following:

<%= form_for(:session, url: login_path, html: {class: "formsignin"}) do |f| %>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.