URL in rails 2.3.10
Hey guys!
How possible can make link like this: http://localhost:3000/questiond_id=5&token=73489开发者_如何学运维3789568495
(there will be only one question (form) and token (unique) for them and that all)
? in routers.rb ? Or where?
Thank you very much!
In rails you can access like this:
http://localhost:3000/questions/5?token=734893789568495
In routes.rb file
resources :questions
You can restrict this by only option if you don't want other actions.
For this, you can use show action of questions controller and your path will be like this
question_path(:id => 5, :token => '734893789568495')
精彩评论