lib/storytime/constraints/page_constraint.rb in storytime-2.0.0 vs lib/storytime/constraints/page_constraint.rb in storytime-2.1.0

- old
+ new

@@ -1,13 +1,13 @@ module Storytime module Constraints class PageConstraint include Storytime::Concerns::CurrentSite - + def matches?(request) site = current_storytime_site(request) site.pages.friendly.exists?(request.params[:id]) || File.exists?(Rails.root.join('app', 'views', "storytime/#{site.custom_view_path}/pages/#{ActionController::Base.helpers.sanitize(request.params[:id])}.html.erb")) end end end -end \ No newline at end of file +end