Params & Class Methods

Hello all! This is my first time posting to the list, so be gentle. :wink:

Here's my setup.... I've created a controller class method for performing some access control actions during a before_filter callback. What I'd like to do is access the params from within the class method without having to explicitly pass them in the controller. I'd like to check the path in the url for some finer grained authentication.

I've tried to do a couple of different ways, but I think params are either out of scope or not created by the time the before filter runs.

Is what I'm proposing possible?

Example of what I'd like to do:

in controller...... class ProjectController < ApplicationController    class_method_call 'do something'

   ...... rest of controller code ... end

in lib..... module AccCheck   def self.included(in_sub)     in_sub.extend(ClassMethods)   end

  module ClassMethods     def class_method_call(in_string)       before_filter do |c|          if !params[:id].nil?           .... check access .....          end       end     end   end

end

Yikes... it sounds like if I could do that it could be a clash of biblical proportion. I really have no reason for not being able to pass the params in the controller. I was curious to know if something like that was accessible with the class method I was creating.

Thanks for the info.