lib/cadmus/routing.rb in cadmus-0.4.3 vs lib/cadmus/routing.rb in cadmus-0.4.4
- old
+ new
@@ -15,11 +15,11 @@
# assert_recognizes doesn't pass the full params hash as we would in a real Rails
# application. So we have to always pass this constraint if we're testing.
return true if page_glob.nil? && Rails.env.test?
page_glob.sub(/^\//, '').split(/\//).all? do |part|
- part =~ /^[a-z][a-z0-9\-]*$/
+ part =~ /\A[a-z][a-z0-9\-]*\z/
end
end
end
end
@@ -65,6 +65,6 @@
scope 'pages' do
instance_eval(&page_actions)
end
end
end
-end
\ No newline at end of file
+end