sethvargo/bootstrap_forms — Issue #8: Really strange error
Author: sopwithpup
Created: 2012-02-03 21:36:13+00:00
State: open

I've a form which breaks in an odd way using latest version

Works

<%= form_for @item do |f| %>
<%= f.text_field :total_amount %>
<%= f.text_field :vat %>
<%= f.text_field :vat_free_amount %>

Fails

<%= bootstrap_form_for @item do |f| %>
<%= f.text_field :total_amount %>
<%= f.text_field :vat %>
<%= f.text_field :vat_free_amount %>

Error message:

TypeError in Items#new

Showing app/views/items/_amount.html.erb where line #4 raised:

can't convert nil into String

line #4 is <%= f.text_field :vat %>
It is happy with line 3. if I remove lines 3 & 4 the form works as a bootstrap!

I have changed nothing else in the project except the bootstrap form for gem.

I'm stumped, any ideas?