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.0.35 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.34 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.33 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.32 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.30 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.29 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.27 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.26 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.25 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.24 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.23 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.22 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.21 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.20 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.19 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.18 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.17 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.16 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.15 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.14 app/controllers/concerns/minimum_viable_product/seo_concern.rb