Hi Cynthia, I tried changing my controller to the following. require_dependency "projects_controller"
class ProjectRankController < ProjectsController layout 'base' #require a manager to update priorities before_filter :require_manager, :only => :update before_filter :authorize, :except => :order ... end However when I try my overridden "list" action, it doesn't work with the projects controller routes. The default is "projects/list", but my list action never gets called. If my Project Rank Controller is a Project controller, do I still have to change the routes to call my subclass? Thanks, Todd On Sun, Mar 9, 2008 at 7:20 AM, Cynthia Kiser <[EMAIL PROTECTED]> wrote: > I think you could extend ProjectsController - but it would mean that > your ProjectRankController *is a* ProjectsController. So, for example, > I am not sure it would automatically know about your project_rank > model - it might just know about the project model. > > Quoting Todd Nine <[EMAIL PROTECTED]>: > > Well, just a follow up. I fixed my issue by extending > > "ApplicationController". When I extend "ProjectsController" which is > part > > of the base app, everything blows up. Are we not allowed to extend code > > from the base app in rails engine? > > > > > > > > > project_rank_controller.rb > > > > > > class ProjectRankController < ProjectsController > > > def order > > > print 'foobar'; > > > end > > > end > _______________________________________________ > Engine-Developers mailing list > [email protected] > > http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org >
_______________________________________________ Engine-Developers mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
