title: Open popup from Controller in Rails
body: <p>I'm creating my first sample Rails application. I have used rufus-scheduler in my application and call controller's action after every 10 sec. My code as follows:</p>
  
  <p>In config/initializers I've created task_scheduler.rb and it contains:</p>
  
  <pre><code>require 'rubygems'
  require 'rufus/scheduler'
  scheduler = Rufus::Scheduler.new
  scheduler.every("10s") do
    MyTaskController.doSomething
  end
  </code></pre>
  
  <p>I also created a controller named MyTaskController and code is:</p>
  
  <pre><code> class MyTaskController &lt; ApplicationController
    def self.doSomething
      puts "some task"
    end
  end
  </code></pre>
  
  <p><strong>It works perfectly, but I want to show a popup alert instead of using puts function. Is it possible in rails to call a javascript alert or javascript:window.open from controller (my doSomething action)?</strong></p>