This project is archived and is in readonly mode.

#5764 ✓stale
Keith Pitt

ActionController::Testing incorrectly returns filter names

Reported by Keith Pitt | October 7th, 2010 @ 01:44 AM

Given we have a controller that looks like this:

class MyController < ApplicationController
  before_filter :filtername1
  before_filter :filtername2
  before_filter :filtername2
end

ActionController::Testing#before_filters was returning

[ :process_action, :process_action, :process_action ]

instead of

[ :filtername1, :filtername2, :filtername3 ]

I've added a patch that fixes the issue, and I'm using ActionController::Testing in the filters_test (which in turn tests my change).

I've run the action-pack tests locally, and all seems well.

Thoughts?

Keith

Comments and changes to this ticket

  • Keith Pitt

    Keith Pitt October 7th, 2010 @ 03:39 AM

    Actually, looking it again, shouldn't #before_filters live in ActionController::TestCase::Behavior?

    RSpec includes ActionController::TestCase::Behavior in its controller specs, so to get access to #before_filters in RSpec, the method should either live in there ActionController::TestCase::Behavior, or ActionController::TestCase::Behavior should include ActionController::Testing.

  • Keith Pitt

    Keith Pitt October 7th, 2010 @ 11:54 PM

    Ignore my last comment - not sure what I was smoking at that point.

  • Andrea Campi

    Andrea Campi October 11th, 2010 @ 07:21 AM

    • Tag changed from 3.0, action_pack, before_filter, bug, patched to 3.0, action_pack, before_filter, bug, patch

    bulk tags cleanup

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:30 PM

    • State changed from “new” to “open”
    • Tag changed from 3.0, action_pack, before_filter, bug, patch to 30, action_pack, before_filter, bug, patch

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:30 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages