Forum: Ruby on Rails Bug with skip_before_filter?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E79388a304393642ceafefed6a7bfc4f?d=identicon&s=25 Christopher (Guest)
on 2006-03-29 23:06
There seems to be a bug with skip_before_filter using the :only or
:except conditionals.

Or am I using them completely wrong?

I have this code:
The result is that :test_filter is skipped for both index, and
index_no_filter.

application.rb
# Filters added to this controller will be run for all controllers in
the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
  before_filter :test_filter

  def test_filter
    flash[:notice] = "The filter was called"
  end

end


test_controller.rb
class TestController < ApplicationController
skip_before_filter :test_filter, :only => :index_no_filter

def index
end

def index_no_filter
end

end
This topic is locked and can not be replied to.