Sha256: 19068b13eb94d0c101368ae5c661a922a5998a0d5f7da8d91a7f615855803de8

Contents?: true

Size: 222 Bytes

Versions: 4

Compression:

Stored size: 222 Bytes

Contents

# http://robotslacker.com/2012/01/rails-3-routes-configuration-dynamic-segments-constraints-and-scope/
class PageConstraint
	def initialize
	end

	def matches?(request)
		Page.exists?(request.path_parameters[:id])
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
valid_route-0.0.4 test/dummy/app/constraints/page_constraint.rb
valid_route-0.0.3 test/dummy/app/constraints/page_constraint.rb
valid_route-0.0.2 test/dummy/app/constraints/page_constraint.rb
valid_route-0.0.1 test/dummy/app/constraints/page_constraint.rb