Where I’m blocking is on how to get the ‘options’ data in the do_something
method. I think I can write this as:
The way I’ve done this in the past, which may or may not be the
slickest way to do it, is along the lines of:
class MyController < ApplicationController
before_filter :only => “whatever” do |controller|
controller.some_method(1,2,3)
end
def some_method(a,b,c)
...
end
end
The proc has the controller object itself yielded to it, so you can
then call the method on that object with whatever arguments you need.
The particular case you’ve got, where you seem to be testing for
whether this controller needs a particular filter, looks like it would
probably better handled with skip_before_filter and friends. But
anyway, you can grab the controller object and call methods on it
directly.