Created
October 20, 2010 20:41
-
-
Save lbjay/637272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16:18:02 cbeer_ | in the routes config for catalog, you can tell the | |
resources mapper what an id looks like | |
16:18:30 cbeer_ | so, for openvault, we have ids like | |
org.wgbh.mla:348bd4b1ae559bcd90abab7b114328312a4bf800 | |
16:19:00 cbeer_ | so my catalog route looks like | |
16:19:06 cbeer_ | map.resources(:catalog, | |
16:19:07 cbeer_ | [...] | |
16:19:11 cbeer_ | requirements => { :id => | |
/([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|~|_|(%[0-9A-F]{2}))+/ } | |
16:19:13 cbeer_ | ) | |
16:19:35 cbeer_ | your regular expression is left as an exercise for | |
the reader |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment