Permalink
Browse files

Find html.slim template also

+ constraint with wildcard matcher
  • Loading branch information...
1 parent 34db898 commit f702ca4140c5dee0ee4164d2e826a92c471653da @timurvafin timurvafin committed with harlow Nov 1, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/high_voltage/constraints/root_route.rb
@@ -2,8 +2,6 @@ module HighVoltage
module Constraints
# Routing constraint to validate request.path has a corresponding view
class RootRoute
- VIEW_EXTENSIONS = 'html.erb,html.haml,html'
-
def self.matches?(request)
pattern = file_pattern(request.path)
@@ -13,7 +11,7 @@ def self.matches?(request)
private
def self.file_pattern(page_id)
- "#{content_path}#{page_id}.{#{VIEW_EXTENSIONS}}"
+ "#{content_path}#{page_id}.html*"
end
def self.content_path

0 comments on commit f702ca4

Please sign in to comment.