I am using devise
with twitter-bootstrap-rails
, but i got the error on form_for
, any file i didn’t include?
undefined local variable or method `html' for #<#<Class:0x007fc07b544410>:0x007fc0810b8b70>
Here is the code:
<%= menu_group pull: :right do %>
<% if current_user %>
<%= menu_item "Log Out", destroy_user_session_path, :method => :delete%>
<% else %>
<!-- error here-->
<%= form_for @user, url: user_session_path(:user), html => {class: "navbar-form pull-right"} do |f| -%>
<p><%= f.text_field :email %></p>
<p><%= f.password_field :password %></p>
<p><%= f.submit "Sign in" %></p>
<% end -%>
<% end %>
<% end %>
EDIT
: synax error, just copied from https://github.com/seyhunak/twitter-bootstrap-rails
2
Answers
You are missing a colon(:). It should be
:html =>
orhtml:
It’s a syntax error. Do Ctrl+F to find the only occurrence of “html”, and then consider why it may be failing.
or
will be your fix.