Place it in a module somewhere and have both controllers to include that module.
- Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Thu, Apr 23, 2009 at 4:47 PM, Heinz Strunk <rails-mailing-l...@andreas-s.net> wrote: > > Is there a DRY way to have a helper method for 2 different controllers? > > For example: > @user.create_points_account(10) > @group.create_points_account(10) > > and the helper method would look like this: > > def create_points_account pts > f = PointAccount.new(:points => pts) > f.resource = self > return false if !f.save > end > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---