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
Please fix select_tag in 3.2.8 #7404
Comments
What exception is raised? What's the stack trace of the exception? Please send as much info as you can, thanks. |
TypeError in Application#index Showing (...) where line #32 raised: can't convert nil into String ... activesupport (3.2.8) lib/active_support/core_ext/string/output_safety.rb:114:in |
@carlosantoniodasilva looks like we need to change or make |
Seems like it worked "by chance" so far: >> ''.html_safe + nil
=> "" And here's the culprit: a37c474. I think that ensuring option_tags is not empty should be enough, right? options_tags ||= '' |
yeah, this should work. Or: def select_tag(name, option_tags = '', options = {}) ? |
@nashby this will not work in the case that the second argument is |
@rafaelfranca right. |
just add: before work with options_tags in select_tag method |
option_tags coerced to "" instead of nil Closes #7404
Hi!
In 3.2.7 this code was possible if 'auto_models_for_select' is nil :
<%= select_tag :model, auto_models_for_select, :include_blank => true,
:disabled => auto_models_for_select.nil? %>
In 3.2.8 this should be :
<%= select_tag :model, auto_models_for_select || '', :include_blank =>
true, :disabled => auto_models_for_select.nil? %>
If second parameter is nil it raise an exception.
Please, return back that it was possible to transfer nil of second
parameter - options.
The text was updated successfully, but these errors were encountered: