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" %>

```
Well, it's not that you **CAN'T** do it, it's just kind of a convoluted process. I did this in a project I'm working on. Basically, it's a mixture of Rails goodness and Javascript. I simply passed a flash notice on creation of an instance, and then used a script to set that flash notice equal to a js variable, and a redirect\_url. If that particular flash notice pops up on that page, it redirects in the js script. Like I said, it's **hack hack hack**, but it works for my purposes.