This project is archived and is in readonly mode.

#1581 ✓committed
Tys von Gaza

ActionController::Caching::Sweeping method_missing doesn't take a proc

Reported by Tys von Gaza | December 15th, 2008 @ 09:29 PM

If you want to run a controller action that requires a proc it won't get passed along through the sweepers method missing call.

IE, the following will get "no block":

class DevicesController < ApplicationController cache_sweeper :device_sweeper, :only => [ : mymethod ]

def mymethod(&block)

 if block_given?
   "no block"

end end

class DeviceSweeper < ActionController::Caching::Sweeper observe Device def after_create(device)

mymethod do |page|
  "doing stuff in my block"

end end

To fix this, a &block argument has to be added onto the the method missing in ActionController::Caching::Sweeping.

Comments and changes to this ticket

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=""></a>

People watching this ticket


Referenced by