Groups
Groups
Sign in
Groups
Groups
sinatrarb
Conversations
About
Send feedback
Help
prefixed route splats?
12 views
Skip to first unread message
trans
unread,
Jun 23, 2012, 5:26:52 AM
6/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sina...@googlegroups.com
Can Sinatra handle routes with partial letters in the splats, eg. in this case a prefixed `v`:
# example call: /v1.0.0/rss.xml
get '/v*/rss.xml' do
params[:splat] #=> ['1.0.0']
Carl Hörberg
unread,
Jun 23, 2012, 9:33:08 AM
6/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sina...@googlegroups.com
use regex instead: get %r{/(.*)/rss.xml}
> --
> You received this message because you are subscribed to the Google Groups
> "sinatrarb" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/sinatrarb/-/KW_8slPkjAIJ
.
> 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
.
Reply all
Reply to author
Forward
0 new messages