render :js is something that can be used in place of the render :update.
Which means, the request type should be XHR and not HTTP... in simple
words, the render :js will only work for Ajax requests.
If you want something of this sort for the normal HTTP requests... it
can be achieved by something like this in your controller...
@js = "alert('hi')" # or whatever set of js statements needed
render :inline => "<%= javascript_tag(@js) %>"
regards,
Sur
http://crimson9.com
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.