app/helpers/retailers_helper.rb in spree_retailers-0.50.0.0 vs app/helpers/retailers_helper.rb in spree_retailers-0.70.0.0
- old
+ new
@@ -1,8 +1,11 @@
module RetailersHelper
- def state_nav_helper
- states = (@retailers || Retailer.select(:state).group(:state).all).collect(&:state).uniq
+ def state_nav_helper(retailers=[])
+ states = retailers.collect(&:state).uniq
+
+ puts states
+
return "" unless 1 < states.length
states.collect{|state| link_to(state, "##{state.downcase}") }.join(" | ").html_safe
end
end
\ No newline at end of file