redirect_to kills JS request in Rails 3


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 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 | 4 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 10, 2019 by Ilnar25
110,608 questions
257,186 answers
0 comments
27,908 users