I guess I did not made myself clear. I said create a module somewhere (usually under the lib folder), like:
#lib/points.rb module Points def create_points_account( pts ) f = PointAccount.new(:points => pts) f.resource = self return false if !f.save end end And then at your controller: class SomeController < ActionController::Base include Points end - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Thu, Apr 23, 2009 at 5:03 PM, Heinz Strunk <rails-mailing-l...@andreas-s.net> wrote: > > I included it in the controller with helper :points and called it like > above but I get an error: > undefined method create_points_account > > What could be the problem? > > Maurício Linhares wrote: >> 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 > > -- > 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 -~----------~----~----~----~------~----~------~--~---