我有一个form设计如下
= form_for :url => @question do |f|
  %table
    %thead
      %td
        = f.label :ques
      %tr
        = select_tag 
选项 %tbody#questions
在我的控制器中,我有
def new
  @question = Question.new
  respond_to do |format|
    format.html
    format.js
  end
end
在 new.html.haml
:javascript
  $('select').change(function() {
    $.ajax({
      url: window.location.href
    });
  });
我在上面的编码中哪里错了?为什么这个页面没有以js格式呈现?