On Mon, Jun 23, 2008 at 12:16:35AM +0200, Magnus Holm wrote: > The route maker's job is basically two things: > - Make sure that all controllers includes the right mixins > - If any controllers doesn't respond to "urls" (aka. haven't been inherited > from R) define "urls" as ClassName.downcase > > The first point can be accomplished within R, but not the latter. But it > should be noted that the latter also can cause some troubles.
Or, maybe, instead of getting rid of #2 we could make it go a bit beyond just downcasing to help steer us away from regexps. module Blog::Controllers class Index # automatically '/' def get; end end class ViewN # automatically '/view/(\d+)' def get id; end end class ViewX # automatically '/view/(\w+)' def get name; end end class ViewYMD # automatically '/view/(\d+)/(\d+)/(\d+)' def get time; end end end _why _______________________________________________ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list