Hi all -
I've got a set of common actions (for displaying photo thumbnails and their preview) that I'd like to share b/n a couple of controllers (ie. photos for people and photos for events).
I'm trying to figure out how best to extract this common functionality so it's easy to update/manage (ie. dry).
The views aren't a problem, I know how to do that, but I'm getting stuck with the controller/actions...
Right now I've got my actions in a *module* that I'm *include*'ing in each controller. Works except I get the following when one of the protected methods (defined in the module) tries to use Paginator. It works if I move it into the controller.
My module is in lib/photos.rb and the error I'm getting is this:
uninitialized constant Paginator
This error occured while loading the following files:
Also, I'd like to setup a before_filter for these common actions, but that doesn't seem to work very well either.
Any ideas? Or other solutions?