Sha256: 417ce5fdb2127ceeb243aa0e78963969ee502b9bb3d34cd0b97e12d0569297ec

Contents?: true

Size: 423 Bytes

Versions: 9

Compression:

Stored size: 423 Bytes

Contents

module Locomotive
  module DashboardHelper

    def current_site_url
      if current_site.domains.blank?
        preview_url(current_site)
      else
        protocol = current_site.redirect_to_https? ? 'https' : 'http'
        URI.join("#{protocol}://" + current_site.domains.first).tap do |uri|
          uri.port = request.port if request.port != 80 && request.port != 443
        end.to_s
      end
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.2.0.alpha1 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.1.1 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.1.0 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.1.0.rc1 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.0.3 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.0.2 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.0.1 app/helpers/locomotive/dashboard_helper.rb
locomotivecms-4.0.0 app/helpers/locomotive/dashboard_helper.rb