Awesome q2a theme

redirect_to kills JS request in Rails 3

0 like 0 dislike
34 views
Form with :remote => true submitit update records in the update method that in turn if everything is OK using redirect_to sends to the show method and the show method renders a js that displays a new record. And all is well in Opera, but under FF the redirect after the show leaves the "as HTML". How to make redirect on JS too?
by | 34 views

3 Answers

0 like 0 dislike
try to do a redirect instead of the Rener action and flash be written as follows:
flash.now[:notice] = 'Hello world!'
\r
I'm not exactly sure, but I think flash.now exactly what you need
by
0 like 0 dislike
Do not use rediret_to. Try to call the show method explicitly in the update method.
by
0 like 0 dislike
I could be wrong, but worth a try
flash[:notice] = 'Hello world!'
before calling render
by

Related questions

0 like 0 dislike
1 answer
asked May 21, 2019 by Mirkom63
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Apr 9, 2019 by Ilnar25
110,608 questions
257,187 answers
0 comments
40,796 users