On Thursday, December 12, 2013 9:26:14 AM UTC, Ruby-Forum.com User wrote:
>
>
> Here my issue i cant redirect_to new_products_path... what may be my 
> mistake ??  redirection is happening in console. but not not in ui. 
> whether is is because ajax call in form, how to redirect ?? 
>
> It's because it's an ajax call - doing a redirect just affects what data 
that ajax request returns (and it happens completely invisibly from the 
point of view of the thing making the ajax request). It won't make the 
containing page reload.
If you are rendering JS then a straightforward way is for your response to 
contain window.location = ...

Fred

 

> -- 
> 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/dc276718-98a0-4ace-b6e6-eae1fa2244ee%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to