Question: I'm in my applications controller and I have a url string. How do I tell the app to open the url in the browser in a new window. Is there a way to set the target to blank?

For example

```
def link
  @url = 'www.google.com'
  ****??? Open @url ?? *** with target blank?
end

```

Answer: 
As the others point out, you can't (and shouldn't) do this in the controller. In the view you can use

```
<%= link_to @url, :target => "_blank" %>

```
You can't do that in rails, because your script is being executed on a server.
Use Javascript to work with browser on the client side.