app/controllers/wcc/contentful/app/pages_controller.rb in wcc-contentful-app-1.2.0 vs app/controllers/wcc/contentful/app/pages_controller.rb in wcc-contentful-app-1.2.1
- old
+ new
@@ -10,10 +10,10 @@
page_model.find_by(slug: '/', options: { include: 3, preview: preview? })
render 'pages/show'
end
def show
- slug = '/' + params[:slug]
+ slug = "/#{params[:slug]}"
@page = page_model.find_by(slug: slug, options: { include: 3, preview: preview? })
return render 'pages/show' if @page
redirect = redirect_model.find_by(slug: slug, options: { include: 0, preview: preview? })