In my application, with ajax (remote => true) actived, i can not call
dialog box via jquery-ui to be open normally.
In fact, the call works, but:
In the body, there is a sort/search div part (this one refer to a
sort_controler.rb file, who redirect to my movie_controler.rb after do
his job… this part serv for filter like “title” or “date” order of
view, and/or “style of movie” to be listed, etc… all this is inside a
form_for construction), follow by a paginate (kaminari) div (render
partial part… this one works perfectly with remote ajax control,
follow by a movie list (each movie is represented by a title and an
linked image (when you click on the image of the jacket, a dialog bo
need to be open with all the caracteristic of the movie concerned by the
movie_controller.rb file (for act the remote ajax to works), if i click
on the linked jacket image, the box appears (efect no have time to be
finish), and cancel quickly because all the process (respond_to =>
format js => render my index.js file) of render call to refresh the
remote ajax part. So, sure, the render partials are all render again. If
i “sort” (for exemple by select “action movies” to be listed, and submit
it), the kaminari paginate remoted works, the remote ajaxed list of
movies appears good… but if i click on a linked movie jacket, i go
back to the first loaded page.
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.
When i click on the link_to, i see on the console that it looks like i
click on my submit button for sort… the commit in params is the same.
So… how to change this commit (like that i could test by this way to
redirect correctly) ?
thanks for help