M
Martin DeMello
I've already asked on the Halcyon list, but if any other
microframework can do this I'd like to know. Essentially I want a
route to fail on a missing controller/action as well as on an
unmatched pattern.
martin
---------- Forwarded message ----------
From: Martin DeMello <[email protected]>
Date: Fri, Jun 27, 2008 at 3:06 PM
Subject: fallthrough routing
To: Halcyon Development <[email protected]>
I would like to match /:controller/:action, and if that does not
exist, fallthrough to a "method_missing" action, e.g.
conceptually:
match(/:foo/:bar).to({:controller => ':foo', :action => ':bar'})
# if not
match(/:foo/:bar).to({:controller => 'application', :action =>
'default'})
params[:foo] and params[:bar] will then be available to /application/
default to let it proceed.
Is this sort of thing possible at all?
martin
microframework can do this I'd like to know. Essentially I want a
route to fail on a missing controller/action as well as on an
unmatched pattern.
martin
---------- Forwarded message ----------
From: Martin DeMello <[email protected]>
Date: Fri, Jun 27, 2008 at 3:06 PM
Subject: fallthrough routing
To: Halcyon Development <[email protected]>
I would like to match /:controller/:action, and if that does not
exist, fallthrough to a "method_missing" action, e.g.
conceptually:
match(/:foo/:bar).to({:controller => ':foo', :action => ':bar'})
# if not
match(/:foo/:bar).to({:controller => 'application', :action =>
'default'})
params[:foo] and params[:bar] will then be available to /application/
default to let it proceed.
Is this sort of thing possible at all?
martin