I would do this using Regexp, for me it's the better way.something like:route :get, :delete, :post, :put, %r{/(?<model>.*)(?:/(?<action>.*))?(?:/(?<id>[1-9][0-9]*))?} do ...I didn't test this code, but i think it will work
--
--
You received this message because you are subscribed to the Google Groups "sinatrarb" group.
To post to this group, send email to sina...@googlegroups.com.
To unsubscribe from this group, send email to sinatrarb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sinatrarb?hl=en.
Carlos Eduardo L. LopesSkype: carloslopespollares | Twitter: @_carloslopes
--
You received this message because you are subscribed to the Google Groups "sinatrarb" group.
To post to this group, send email to sina...@googlegroups.com.
To unsubscribe from this group, send email to sinatrarb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sinatrarb?hl=en.