I have a problem with form_for
on Ruby on Rails, using Ruby 2.0 and Rails 4.0.0.
I followed this tutorial, everything went perfect until i added the form_for
. When I open the sign up page, it throws:
Completed 500 Internal Server Error in 4ms
ActionView::Template::Error (no implicit conversion of Bignum into String):
3:
4: <div class="row">
5: <div class="span6 offset3">
6: <%= form_for User.new do |f| %>
7:
8: <%= f.label :name %>
9: <%= f.text_field :name %>
app/views/users/new.html.erb:6:in `_app_views_users_new_html_erb___700836681490305320_18582480'
This is my app/views/users/new.html.erb
<% provide(:title, 'Sign up') %>
<h1>Sign up</h1>
<div class="row">
<div class="span6 offset3">
<%= form_for(@user) do |f| %>
<%= f.label :name %>
<%= f.text_field :name %>
<%= f.label :email %>
<%= f.text_field :email %>
<%= f.label :password %>
<%= f.password_field :password %>
<%= f.label :password_confirmation, "Confirmation" %>
<%= f.password_field :password_confirmation %>
<%= f.submit "Create my account", class: "btn btn-large btn-primary" %>
<% end %>
</div>
</div>
Sign up