1.indicate url parament
add new link on index web page
#vim /cms/app/views/demo/index.html.rb
<%= link_to('original web page',{:controller=>'demo',:action=>'index',:id=>'20',:page=>'5'}) %>
it will make url http://192.168.1.99/demo/index/20?page=5
2.use params to get value from url
add params to get parameters from url
#vim /cms/app/views/demo/index.html.rb
ID:<%= params['id'] %>
沒有留言:
張貼留言