Saturday, 15 March 2014

session - Rails show/store values in url -


After submitting the form I want to store your current URL for my new URL (which I at that page Was redirected).

For example:

  www.someurl.com/myproject?limit=10   

I have tried

I get an error: no root matches {: no action = & gt; "Show",: Controller => "Patient_record" ,: border => 10}

Edit: So I think it

  patient_record_path (id: 1, range: 10)   

render it but it does not appear in the URL of these values ​​

rake route

  Patient_record_index GET /patient_record(.:format) patient_record # index POST /patient_record(.:format) patient_record to # create new_patient_record get /patient_record/new(.:format) patient_record # new edit_patient_record /patient_record/:id/edit(.:format) Rogi_krorded # edit Rogi_snkramn gET /patient_record/:id(.:format) p Atient_record # show PUT /patient_record/:id(.:format) patient_record # update dELETE /patient_record/:id(.:format) patient_record # destroy   

Use "params.merge" to keep the previous parameters, for example

< Code> & lt;% = link_to 'link', parameters.marg ({: per_page = & gt; 20})%>

No comments:

Post a Comment