Sha256: f3e4d01202af3657e0d56b1dac97426b51dd7e03428df3b702c1af6f21e9b2a0

Contents?: true

Size: 485 Bytes

Versions: 90

Compression:

Stored size: 485 Bytes

Contents

module MinimumViableProduct
  module SEOConcern
    extend ActiveSupport::Concern

    private

    included do
      before_action :force_no_trailing_slash
      helper_method :page
    end

    def force_no_trailing_slash
      return if request.path == '/'
      redirect_to request.original_url.gsub(/\/$/,'') if request.original_url.match(/\/$/)
    end

    def page
      @page ||= begin
        h = Hashie::Mash.new
        h.classes = []
        h
      end
    end
  end
end

Version data entries

90 entries across 89 versions & 2 rubygems

Version Path
minimum_viable_product-0.7.15 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.14 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.13 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.12 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.11 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.10 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.9 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.8 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.7 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.6 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.5 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.4 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.3 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.2 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.1 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.7.0 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.6.7 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.6.6 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.6.5 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.6.4 app/controllers/concerns/minimum_viable_product/seo_concern.rb