What is the Rails way for exposing algorithmic resources? Is it via the
first URL in the example or the second? If it is the second, please can
you give me some guidance on how to achieve this.
Thanks
What is the Rails way for exposing algorithmic resources? Is it via the
first URL in the example or the second? If it is the second, please can
you give me some guidance on how to achieve this.
Thanks
What is the Rails way for exposing algorithmic resources? Is it via the
first URL in the example or the second? If it is the second, please can
you give me some guidance on how to achieve this.
Thanks
Rails conventions says that /articles/20061201-20071201 finds the
article with the id ‘20061201-20071201’. Anything other than that would
be unconventional.
There are of course conventions to breaking the conventions, though ; )
Personally, I’d do something like map.article_range ‘/articles/:range’,
:action => ‘range’, :requirements => {:range => /(d+)-(d+)/}. In the
‘range’ action, I’d do what YangBaikHati suggests above. start, finish =
params[:range].split(‘-’).
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.