Revision 52667feb
Added by Joseph Magen over 10 years ago
app/helpers/layout_helper.rb | ||
---|---|---|
end
|
||
|
||
def select_f(f, attr, array, id, method, select_options = {}, html_options = {})
|
||
html_options.merge!(:size => 'col-md-10') if html_options[:multiple]
|
||
field(f, attr, html_options) do
|
||
addClass html_options, "form-control"
|
||
f.collection_select attr, array, id, method, select_options, html_options
|
||
... | ... | |
end
|
||
|
||
def selectable_f(f, attr, array, select_options = {}, html_options = {})
|
||
html_options.merge!(:size => 'col-md-10') if html_options.include?(:multiple)
|
||
html_options.merge!(:size => 'col-md-10') if html_options[:multiple]
|
||
field(f, attr, html_options) do
|
||
addClass html_options, "form-control"
|
||
f.select attr, array, select_options, html_options
|
Also available in: Unified diff
fixes #4132 - helper select_f missing option for :multiple => true to increase width