title: Pop up window in ruby on rails
body: <p>I got a task to pop up new window while clicking edit button.But i cannot get any solution for this. I have a class student and three attributes name,age and branch.I had created view through scaffolding.The task assigned to me is while clicking edit button,there should be a pop up window for edit those attributes.How can i do this? please help.I want to do this like jTable.
  This is my index.html.erb</p>
  
  <pre><code>&lt;table class="tablelist"&gt;
      &lt;caption&gt;Listing students&lt;/caption&gt;
    &lt;tr&gt;
      &lt;th&gt;Name&lt;/th&gt;
      &lt;th&gt;Age&lt;/th&gt;
      &lt;th&gt;Branch&lt;/th&gt;
      &lt;th&gt;&lt;/th&gt;
  
      &lt;th&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;% @students.each do |student| %&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;%= student.name %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= student.age %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= student.branch %&gt;&lt;/td&gt;
  
      &lt;td&gt;&lt;%=link_to (image_tag("edit.png", :alt =&gt; 'Edit'), edit_student_path(student)) %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Destroy', student, :method =&gt; :delete, :data =&gt; { :confirm =&gt; 'Are you sure?' } %&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;% end %&gt;
  &lt;/table&gt;
  
  &lt;br /&gt;
  
  &lt;%= link_to 'New Student', new_student_path %&gt;
  </code></pre>
  
  <hr>
  
  <p>controller of this student class is</p>
  
  <pre><code>def list
      @students = Student.all
      @jtable = {'Result' =&gt; 'OK','Records' =&gt; @students.map(&amp;:attributes)}
  
      respond_to do |format|
        format.html # index.html.erb
        format.json { render :json =&gt; @jtable}
      end
    end
  </code></pre>
  
  <p>index.html.erb is</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;%=stylesheet_link_tag "jtable_blue","http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css",:media =&gt; "all" %&gt;
          &lt;%= javascript_include_tag "jquery-1.8.3.min","http://code.jquery.com/ui/1.9.1/jquery-ui.js","jquery.jtable.min"%&gt;
  &lt;script type="text/javascript"&gt;
      jQuery.noConflict();
      jQuery(document).ready(function () {
          jQuery('#StudentTableContainer').jtable({
              title: 'StudentList',
              actions: {
                  listAction: '/students/list',
                  createAction: '/students/newstudent',
                  updateAction: '/students/edit',
                  deleteAction: '/students/destroy'
              },
              fields: {
                  id: {
                      key: true,
                      create: false,
                      edit: false,
                      list: false
                  },
                  name: {
                      title: 'name',
                      width: '40%'
                  },
                  sex: {
                      title: 'sex',
                      width: '20%'
                  },
                  branch: {
                      title: 'branch',
                      width: '30%'
                  }
  
              }
          });
  
         jQuery('#StudentTableContainer').jtable('load');
      });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div id="StudentTableContainer"&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>routes.rb is</p>
  
  <pre><code>match 'students/list' =&gt; 'students#list', :as =&gt; :list
  </code></pre>