Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_boxes_input doesn't respect :label_method if :collection is Array of Strings or Symbols #301

Closed
jfirebaugh opened this issue Jul 12, 2010 · 2 comments

Comments

@jfirebaugh
Copy link

form.input :foo,
           :as           => :check_boxes,
           :collection   => [:a, :b, :c],
           :label_method => proc {|f| I18n.t(f, :scope => :foo)}

Here, the :label_method proc will never be called due to a shortcut in find_collection_for_column. Instead the labels will be "a", "b", "c". IMO, if :label_method is given explicitly it should always be used, even if an array of strings or symbols is passed as the collection.

@mjonuschat
Copy link
Contributor

Fixed in commit 1420c6b

1 similar comment
@mjonuschat
Copy link
Contributor

Fixed in commit 1420c6b

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants