Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick removals #710

Merged
merged 3 commits into from
Jan 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Solidus 1.3.0 (unreleased)

* Removed Spree::BaseHelper#gem_available? and Spree::BaseHelper#current_spree_page?

Both these methods were untested and not appropriate code to be in core. If you need these
methods please pull them into your app. [#710](https://github.com/solidusio/solidus/pull/710).

## Solidus 1.2.0 (unreleased)

* Admin menu has been moved from top of the page to the left side.
Expand Down
19 changes: 0 additions & 19 deletions core/app/helpers/spree/base_helper.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
module Spree
module BaseHelper

# Defined because Rails' current_page? helper is not working when Spree is mounted at root.
def current_spree_page?(url)
path = request.fullpath.gsub(/^\/\//, '/')
if url.is_a?(String)
return path == url
elsif url.is_a?(Hash)
return path == spree.url_for(url)
end
return false
end

def link_to_cart(text = nil)
text = text ? h(text) : Spree.t(:cart)
css_class = nil
Expand Down Expand Up @@ -136,14 +125,6 @@ def seo_url(taxon)
return spree.nested_taxons_path(taxon.permalink)
end

def gem_available?(name)
Gem::Specification.find_by_name(name)
rescue Gem::LoadError
false
rescue
Gem.available?(name)
end

def display_price(product_or_variant)
product_or_variant.price_in(current_currency).display_price.to_html
end
Expand Down