lib/ransack/helpers/form_builder.rb in ransack-1.2.3 vs lib/ransack/helpers/form_builder.rb in ransack-1.3.0

- old
+ new

@@ -11,11 +11,11 @@ def label(method, *args, &block) options = args.extract_options! text = args.first i18n = options[:i18n] || {} text ||= object.translate( - method, i18n.reverse_merge(include_associations: true) + method, i18n.reverse_merge(:include_associations => true) ) if object.respond_to? :translate super(method, text, options, &block) end def submit(value = nil, options = {}) @@ -125,11 +125,12 @@ ) template_collection_select(:p, collection, options, html_options) end def combinator_select(options = {}, html_options = {}) - template_collection_select(:m, combinator_choices, options, html_options) + template_collection_select( + :m, combinator_choices, options, html_options) end private def template_grouped_collection_select(collection, options, html_options) @@ -200,11 +201,11 @@ bases.map { |base| get_attribute_element(action, base) }.compact end def get_attribute_element(action, base) begin - [Translate.association(base, context: object.context), + [Translate.association(base, :context => object.context), collection_for_base(action, base)] rescue UntraversableAssociationError => e nil end end @@ -212,10 +213,10 @@ def attribute_collection_for_base(attributes, base = nil) attributes.map do |c| [attr_from_base_and_column(base, c), Translate.attribute( attr_from_base_and_column(base, c), - context: object.context + :context => object.context ) ] end end