Re: [Rails] Passing a period as part of an id in show action
>> I am trying to do the following in a RESTful manner:
>>
>> http://myservice.com/controller/the%2bid%2e+value.xml
>>
>> the period causes the rest of url to be considered
>> the "format" parameter.
>
> Can you change your route, rather than
> controller/id.format
> can you have:
> controller/id/format
> This way it wouldn't matter if there are full stops in the id
> (although slashes may become a problem :-)
Or tell Rails periods are okay... using a regex... something like...
:requirements => { :id => %r([\w.]+) }
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home