Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6699 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] Filter Halt log message gets displayed for each filter instead of just the one that halted.

Reported by: martin Assigned to: David
Priority: normal Milestone: 1.2 regressions
Component: ActiveRecord Version: edge
Severity: minor Keywords: tiny
Cc:

Description

Hi All,

A little bug I just caught in my filter code. It seems that as it steps back through the filters it reports all filters as 'halted' if, for example, the third filter in the chain halts.

Filter chain halted as [:validate_user] did not yield.
Filter chain halted as [:check_permissions] did not yield.

This sort of thing happens with :validate_user is the one that fails.

This little (very little) patch should take care of that. I suggest that it goes in before 1.2 is released.

I wasn't exactly sure how to test it since it's really just a logger error but I included the 1.2regression keyword so it wouldn't be missed.

Attachments

fix_multiple_filter_halt_error.diff (1.2 kB) - added by martin on 11/25/06 04:05:31.
Fixes multiple log messages for filters that didn't halt when one filter did.

Change History

11/25/06 04:05:31 changed by martin

  • attachment fix_multiple_filter_halt_error.diff added.

Fixes multiple log messages for filters that didn't halt when one filter did.

12/12/06 22:26:38 changed by bitsweat

(In [5715]) Correctly report which filter halted the chain. References #6699.

12/12/06 22:28:22 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [5716]) Merge [5715] from trunk. Closes #6699.

03/04/07 13:46:23 changed by bitsweat

  • keywords changed from tiny 1.2regression to tiny.
  • milestone changed from 1.2 to 1.2 regressions.