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.3.1 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.3.0 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.7 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.6 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.5 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.4 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.3 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.2 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.1 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.2.0 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.1.2 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.1.1 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.1.0 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.42 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.41 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.40 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.39 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.38 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.37 app/controllers/concerns/minimum_viable_product/seo_concern.rb
minimum_viable_product-0.0.36 app/controllers/concerns/minimum_viable_product/seo_concern.rb