I think I took this from Typo, so you might want to download its
source code and take a peek (it is an excellent resource from a n00b).
Define your base controller to extend from the default rails
application controller:
class Store::BaseController < ApplicationController
Then your classes you want to extend this use this:
class Store::HomeController < Store::BaseController
In my example, I have all my store pages in a subdirectory called
''store''. This allows me to separate the store front from
admin
functions; again, see the typo source for details.
On 3-Jul-05, at 10:53 AM, Steve Downey wrote:
> Rather than inherit from "ApplicationController", I want my
> controllers to
> inherit from "myApplicationController" (which will inherit from
> ApplicationController).
>
> Where do I put the class definition for myApplicationController and
> what do I
> have to do to make it visibible to my controller classes?
>
> (I am new to Ruby/Rails so if there is a better approach to getting
> common
> behavior into my controllers, I am receptive to alternatives.)
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>