#292 open
Clemens Kofler

ExtensibleFormBuilder // Rails inconsistency

Reported by Clemens Kofler | April 29th, 2009 @ 12:10 PM

ExtensibleFormBuilder behaves differently from Rails' default form builder regarding parameters for some methods, namely all methods that have two options hashes instead of just one (one for the "general" options, one for html options). These methods, as far as I see it, are:

  • collection_select
  • select
  • time_zone_select

Or in short: The methods added in FormOptionsHelper.


collection_select :category_id, Category.all, :id, :name, { :include_blank => true }, :class => "some classes"

For the options that ExtensibleFormBuilder adds (e.g. :label), it would make sense for them to be in the first hash:

collection_select :category_id, Category.all, :id, :name, { :include_blank => true, :label => "Category" }, :class => "some classes"

However, this doesn't work since ExtensibleFormBuilder only extracts the last hash. This works:

collection_select :category_id, Category.all, :id, :name, { :include_blank => true }, :class => "some classes", :label => "Category"

Side note: I think this should be fixed in Rails anyway, but in the mean time, we should probably fix it in ExtensibleFormBuilder anyway.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<p>Cutting edge cms, blog, wiki, forum ... plattform.</p>

<p>Find the code on <a href="http://github.com/svenfuchs/adva_cms/tree/master">GitHub: adva cms</a></p>

<p>Part of the business application framework <a href="http://www.advabest.org/">adva best</a>.</p>