rubyonrailsin

A Ruby and Rails talk

Tuesday, March 23, 2010


[Rails] Re: redirection in format.json ...

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Lasse Bunk wrote:
> Here is an example:
>
> format.json { render :json => { :redirect => requests_url } }
>
> and then on your client redirect like this:
>
> if (json.redirect) {
> window.location = json.redirect;
> }
>
> Also try http://www.google.com/search?q=json+redirect
>
> Does this solve your problem?
>
> /Lasse
>
> 2010/3/23 Erwin <yves_dufour@mac.com>

thanks for your help

it seems that json.redirect is bypassed...
I put an alert, and it's not fired up

if (json.redirect) {
alert('redirect');
}
--
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 post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive