Hi is there a better way to accomplish this task? class PortfolioController < ProjectController layout ''portfolio'' def boing redirect_to :action=>:index end alias_method :new , :boing alias_method :destroy , :boing alias_method :edit , :boing alias_method :update , :boing end My portfolio controller implements view only control of the project controller therefore I want to prevent the user from poking around for sensitive methods inside the project controller. This is my current implementation, but it doesn''t feel very DRY. Thanks, Mark -- -------------------------------------------------------------------- I am Mark Daggett and I approve this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060312/8cd443a7/attachment.html
On 3/12/06, M Daggett <heavysixer@gmail.com> wrote:> Hi is there a better way to accomplish this task? > > class PortfolioController < ProjectController > layout ''portfolio'' > def boing > redirect_to :action=>:index > end > > alias_method :new , :boing > alias_method :destroy , :boing > alias_method :edit , :boing > alias_method :update , :boing > end > > My portfolio controller implements view only control of the project > controller therefore I want to prevent the user from poking around for > sensitive methods inside the project controller. > This is my current implementation, but it doesn''t feel very DRY. > Thanks, > MarkIf that''s the only method you want to expose, you could define a route that always calls that action when that controller is accessed.