0

選択ボックスがあり、変更するたびにコントローラーに戻ってデータを取得しています。このデータは div にロードされます。

jQuery:

   $('#groups').change(function() {
       $('#emails').load('/notifications/get', {value: $(this).val()});
  });

コントローラ:

  class NotificationsController < ApplicationController
      def get
        return "test"
      end
  end

意見:

  <div id="groups" class="left">
<%=select_tag 'employee[group_id][]', options_for_select( current_user.groups.map {|s| ["#{s.name} - #{s.description} (" + s.employees.find(:all, :conditions=>{:subscribed=>true}).count.to_s+")", s.id]}), :multiple => true, :size =>6, :style  => "width:250px"%>
  </div>

  <p id="emails"> </p>

405 method not allowedfirebugでデバッグしようとすると、エラーが返されることがわかります。

get、put、および delete のみ
リクエストは許可されます。
4

1 に答える 1

1

そのアクションのルートは設定されていますか?

于 2010-08-25T00:30:42.480 に答える