mjbellantoni / formtastic-bootstrap

Formtastic form builder to generate Twitter Bootstrap-friendly markup.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined method `check_box_checked?' in Rails 4

opened this issue · comments

I'm using rails 4.0.0.beta1.

= semantic_form_for @resource do |f|
  = f.semantic_errors :resource
  = f.inputs do
    = f.input :uid, label: "UID"
    = f.input :system, label: "System", as: :boolean
  = f.actions do
    = f.action :submit, as: :input, label: "Submit"
    = f.action :cancel, as: :link, label: "Cancel"

The 'system' input, a boolean, causes this error:

undefined method `check_box_checked?' for ActionView::Helpers::InstanceTag:Class

The issue got mentioned at Don't use ActionView::Helpers::InstanceTag.check_box_checked? anymore and the fix is here: bluerail/formtastic@71a3bd2, in the rails4beta branch.

So, it seems like a rails4beta branch here would make sense. Has anyone started? I don't foresee big changes; formtastic-bootstrap could just depend on the formtastic rails4beta branch.

Thanks for pointing this out! However there's no action that formtastic-bootstrap needs to take. The formtastic rails4beta branch was merged to the formtastic master branch in the bug that you linked to. Just update your formtastic version either to their git master, or to its next stable release.

You should specify the gem formtastic version in your Gemfile
gem 'formtastic', '2.3.0.rc2'
stop app
$ bundle install
$ rails s