How do I cause a browser redirect from a gem?
I'm creating a gem and I was wondering how I can add a browser redirect. For example, if a class method from the gem is called in a Rails controller, the browser will redirect to a new url.
I can only seem to launch a URL in a n开发者_开发百科ew tab/window. In Rails I would call a simple redirect_to
but I'm not sure of how to do this in Ruby alone.
精彩评论