mike2r wrote in post #1146701:
> On Wednesday, May 21, 2014 7:42:39 AM UTC-4, Ruby-Forum.com User wrote:
>>         format.json { head :no_content }
>>         respond_to do |format|
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>
> The problem is the redirect.  When you do a redirect, Rails actually
> responds with a code 301 to the browser and redirects the browser to the
> new url.  When Rails receives the redirected request, it's treated as a
> completely new request, so no instance variables will persist.
>
> The only way to do what you want is to use a render instead of a
> redirect.

There is an issue with your solution too because the view is updated but 
in the url of the page we can see the name of the function and then we 
can't call other other function by clicking on other buttons of the 
view.

Did I forgot something in my code?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/66a2f93fa3667750b4eace58fdaf69da%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to