title: Open up a pop-up window, select an item and go back to main window in Rails 3.2
body: <p>Inside a page called <code>Program edit</code>, there will be a button named <code>Select image</code> and as it is clicked, a Pop-up window will open which shows list of images. After selecting an image from the list and click to the <code>Add</code> button, pop-up will close up and selected pictures ID will be passed to main window. It should be available to use at program's params after closing image list popup.</p>
  
  <p>Here is the scenario I would like to have.</p>
  
  <p>Which way should I follow while doing this?</p>