on 2014-06-21 11:48
on 2014-06-21 12:20
On 21 June 2014 10:48, jerome jerome <firstname.lastname@example.org> wrote: > > Then, my problem is that i don't know (and not find... documentation on > link_to and render is really poor on the API of Rails) how to attribute > a tag or fixed data to be read to my link_to call for be able to choose > in my controller to redirect, not on my index.js file, but on my > jacket_dialog.js file only (with a condition test for exemple). If i can > do it, my problem (i think) will be resolved. Are you just asking how to pass extra parameters to be passed in the url in link_to? If so then it would have been better just to ask that. You have not showed us the current code for your link_to but assuming it is something like <%= link_to 'Sometext', some_path(..) %> then just add the extra parameter to the path method so it becomes some_path(.. , :some_name >= "some value" ) which will add some_name to the params hash (via the url) so you can access it in the controller. Colin
on 2014-06-21 17:14
Thanks, i arrived to past by this way some params. And from the controller, now, with request.query_string(), i can read it easy. So, i pass by "?someparams=an_target" by the link. And then, i can redirect on the jquery/coffee file has i would like. BUT... i don't know why, my jquery-ui-dialog don't want to open. The target is clearly identified, the dialog div with its id (the target... and i can see the target correctly named with an alert for check: OK) is in place (view by firebug)... why this don,'t want to open ? so... before make all this runing by ajax (remote: true), dialogs bpxs opened well. Maybe i forget something. did you have an idea ?
on 2014-06-21 22:00
On 21 June 2014 16:14, jerome jerome <email@example.com> wrote: > Thanks, i arrived to past by this way some params. And from the > controller, now, with request.query_string(), i can read it easy. So, i > pass by "?someparams=an_target" by the link. No need to do that, just use params[:someparams] > > did you have an idea ? Sorry, I can't help with this problem. Colin
on 2014-06-27 13:18