Module: SolidusSeo::Helpers::UrlHelper

Included in:
Model
Defined in:
lib/solidus_seo/helpers/url_helper.rb

Instance Method Summary collapse

Instance Method Details

#default_url_optionsObject



16
17
18
# File 'lib/solidus_seo/helpers/url_helper.rb', line 16

def default_url_options
  ActionController::Base.default_url_options
end

#route_helperObject



8
9
10
# File 'lib/solidus_seo/helpers/url_helper.rb', line 8

def route_helper
  Rails.application.routes.url_helpers
end

#spree_route_helperObject



12
13
14
# File 'lib/solidus_seo/helpers/url_helper.rb', line 12

def spree_route_helper
  Spree::Core::Engine.routes.url_helpers
end

#store_hostObject



20
21
22
23
24
25
26
# File 'lib/solidus_seo/helpers/url_helper.rb', line 20

def store_host
  @store_host ||=  begin
    store_url = Spree::Store.default.url
    store_url = "http#{'s' if ssl?}://#{store_url}" unless store_url =~ /^https?/
    store_url
  end
end

#url_helperObject



4
5
6
# File 'lib/solidus_seo/helpers/url_helper.rb', line 4

def url_helper
  ActionController::Base.helpers
end