diff --git a/lib/meta_search/helpers/url_helper.rb b/lib/meta_search/helpers/url_helper.rb index 82d3d46..f4b6996 100644 --- a/lib/meta_search/helpers/url_helper.rb +++ b/lib/meta_search/helpers/url_helper.rb @@ -37,6 +37,9 @@ def sort_link(builder, attribute, *args) end options.delete(:default_order) + indicator_spacer = options[:indicator_spacer] || ' ' + options.delete(:indicator_spacer) + html_options = args.first.is_a?(Hash) ? args.shift : {} css = ['sort_link', current_order].compact.join(' ') html_options[:class] = [css, html_options[:class]].compact.join(' ') @@ -45,7 +48,7 @@ def sort_link(builder, attribute, *args) 'meta_sort' => [attr_name, new_order].join('.') ) ) - link_to [ERB::Util.h(name), order_indicator_for(current_order)].compact.join(' ').html_safe, + link_to [ERB::Util.h(name), order_indicator_for(current_order)].compact.join(indicator_spacer)).html_safe, url_for(options), html_options end