Fix search_form_for fail to assign new :class and :id in options, so now search_form_for works with Bootstrap.
This commit is contained in:
parent
f1da420cd8
commit
6683b85240
|
@ -13,8 +13,8 @@ module Ransack
|
|||
end
|
||||
options[:html] ||= {}
|
||||
html_options = {
|
||||
:class => options[:as] ? "#{options[:as]}_search" : "#{search.klass.to_s.underscore}_search",
|
||||
:id => options[:as] ? "#{options[:as]}_search" : "#{search.klass.to_s.underscore}_search",
|
||||
:class => options[:class].present? ? "#{options[:class]}" : "#{search.klass.to_s.underscore}_search",
|
||||
:id => options[:id].present? ? "#{options[:id]}" : "#{search.klass.to_s.underscore}_search",
|
||||
:method => :get
|
||||
}
|
||||
options[:as] ||= 'q'
|
||||
|
|
Loading…
Reference in New Issue