Skip to content

Commit

Permalink
whitespace and line endings were all inconsistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt authored and BDQ committed Sep 23, 2011
1 parent 448820b commit 264b323
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions core/app/helpers/spree/base_helper.rb
Expand Up @@ -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")
Expand All @@ -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]
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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]
Expand All @@ -142,15 +142,15 @@ 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?
warn "DEPRECATION: the /t/taxon-permalink/p/product-permalink urls are "+
"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
Expand Down

0 comments on commit 264b323

Please sign in to comment.