On Feb 15, 2006, at 12:24 PM, Jay Levitt wrote: > How can I override an engine action with nothingness? For > instance, I want > all my users to register themselves, so I want to remove the > ability to > create a new user. > > I tried > > def new > end > > as well as > > undef new > > in my user_controller.rb, but in each case, Rails still tried to > render the > engine's new template, with some errors presumably due to the > now-improperly-set up instance variable. > > In this case, I'm happy creating a fake new action that redirects to > :action => 'home', but it seems like a general need people might > have with > engines. > > Jay Levitt >
I think this is actually an issue with rails itself--whether or not you have a method in your controller, if the view file (.rhtml file) exists, it will be rendered when called upon. I would try this instead: def new render :action => 'home' end Duane Johnson (canadaduane) http://blog.inquirylabs.com/ _______________________________________________ engine-users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
