2

親コントローラーにフィルターを追加しました。しかし、子コントローラーでフィルターをスキップしようとすると、スキップされません。

class ParentController < ApplicationController::Base
  before_filter :hello_world

  def hello_world
    raise Exception.new "Stop the world"
  end
end

class ChildController < ParentController
  skip_before_filter :hello_world
end

うまくいきません。フィルターは常に発生します。before_filter を ChildController に移動すると、スキップは正常に機能します。

私は何が欠けていますか?Rails 3.0.18で作業しています

4

0 に答える 0