Hi all,
I am using Rails 2.3.2 but I'm sure this applies to newer versions as well. I would like to define a custom action in ApplicationController. However, I don't want to add a custom route to every single controller subclass which uses this action. Is there an easy way to do this?
My first inclination was to just route directly to the ApplicationController, since the method does not need to be overridden by any subclasses. But I don't think Rails lets you route to the ApplicationController anymore.
Somebody else suggested something like this:
map.connect ":controller/:action", :controller => my_regex, :action => my_regex
But I'm wondering if this has the potential of conflicting with or overriding other routes? Or if there's generally a better way? Thanks!