lib/ransack/helpers/form_builder.rb in ransack-2.4.1 vs lib/ransack/helpers/form_builder.rb in ransack-2.4.2
- old
+ new
@@ -43,12 +43,12 @@
value ||= Translate.word(:search).titleize
super(value, options)
end
def attribute_select(options = nil, html_options = nil, action = nil)
- options = options || {}
- html_options = html_options || {}
- action = action || Constants::SEARCH
+ options ||= {}
+ html_options ||= {}
+ action ||= Constants::SEARCH
default = options.delete(:default)
raise ArgumentError, formbuilder_error_message(
"#{action}_select") unless object.respond_to?(:context)
options[:include_blank] = true unless options.has_key?(:include_blank)
bases = [''.freeze].freeze + association_array(options[:associations])