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