I have this link to redirect to google is a example , i just need to go to the controller and then make some insert in database and redirect to a torrent link but in the example just show google
<%= link_to "Link", {:controller => "home", :action => "index", :link=> "www.google.com" }%>
when i press the link i continue to the following action
> def index
> @link = params[:link]
> if @link.present?
> return redirect_to @link
> end
> end
but the action don't redirect me to www.google.com just go to this direction
localhost:3000/?link=www.google.com
how can i go to www.google.com and redirect well ?
I just need to specified the protocol in this case http
Now is working with this