From 264b32384a91f1eee777a525c9aed1454500e29e Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Mon, 19 Sep 2011 15:02:13 +1200 Subject: [PATCH] whitespace and line endings were all inconsistent. --- core/app/helpers/spree/base_helper.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/app/helpers/spree/base_helper.rb b/core/app/helpers/spree/base_helper.rb index 343e5a389cc..bebe631208b 100644 --- a/core/app/helpers/spree/base_helper.rb +++ b/core/app/helpers/spree/base_helper.rb @@ -56,12 +56,12 @@ def variant_options(v, allow_back_orders = Spree::Config[:allow_backorders], inc def meta_data_tags object = instance_variable_get('@'+controller_name.singularize) meta = { :keywords => Spree::Config[:default_meta_keywords], :description => Spree::Config[:default_meta_description] } - + if object.kind_of?(ActiveRecord::Base) meta[:keywords] = object.meta_keywords if object[:meta_keywords].present? meta[:description] = object.meta_description if object[:meta_description].present? end - + meta.map do |name, content| tag('meta', :name => name, :content => content) end.join("\n") @@ -88,7 +88,7 @@ def stylesheet_paths def logo(image_path=Spree::Config[:logo]) link_to image_tag(image_path), root_path end - + def flash_messages [:notice, :error].map do |msg_type| if flash[msg_type] @@ -98,7 +98,7 @@ def flash_messages end end.join("\n").html_safe end - + def breadcrumbs(taxon, separator=" » ") return "" if current_page?("/") || taxon.nil? separator = raw(separator) @@ -120,8 +120,8 @@ def taxons_tree(root_taxon, current_taxon, max_level = 1) root_taxon.children.map do |taxon| css_class = (current_taxon && current_taxon.self_and_ancestors.include?(taxon)) ? 'current' : nil content_tag :li, :class => css_class do - link_to(taxon.name, seo_url(taxon)) + - taxons_tree(taxon, current_taxon, max_level - 1) + link_to(taxon.name, seo_url(taxon)) + + taxons_tree(taxon, current_taxon, max_level - 1) end end.join("\n").html_safe end @@ -131,7 +131,7 @@ def available_countries return Country.all unless zone = Zone.find_by_name(Spree::Config[:checkout_zone]) zone.country_list end - + def format_price(price, options={}) options.assert_valid_keys(:show_vat_text) options.reverse_merge! :show_vat_text => Spree::Config[:show_price_inc_vat] @@ -142,7 +142,7 @@ def format_price(price, options={}) formatted_price end end - + # generates nested url to product based on supplied taxon def seo_url(taxon, product = nil) return '/t/' + taxon.permalink if product.nil? @@ -150,7 +150,7 @@ def seo_url(taxon, product = nil) "not used anymore. Use product_url instead. (called from #{caller[0]})" return product_url(product) end - + def current_orders_product_count if current_order.blank? || current_order.item_count < 1 return 0