On Thu, Aug 30, 2007 at 06:00:28PM -0600, Duane Johnson wrote:
> [1]http://pastie.textmate.org/92610
>
> Let me know if you have any questions.
This is very useful to understand what the new system is capable of, thank
you.
Could you explain if there some efficiency penalty in using the defer_to
syntax? For example,
r.match("/::/users/::").
to(:controller => "users", :action => "[2]", :id => "[1]")
could potentially be rewritten as
r.match("/::/users/::").defer_to {
{:controller => "users", :action => $2, :id => $1}
}
(I'm not sure $1, $2 etc are actually set at this point, but you get the
idea). Doing it this way would use more standard Ruby notation for captures
than "[1]" and "[2]", which is why I like it.
But does using the to(...) syntax allow you to compile the router into a
faster form?
Regards,
Brian.
_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel