Topic: how to do overiding and overloading in rails?

method overloading and overriding possible in rails?
  what is effective way for doing it?

Re: how to do overiding and overloading in rails?

Yes, it is. Question is exactly what do you want to overload? In rails it's generally referred to as monkey patching tongue

Re: how to do overiding and overloading in rails?

I'll resurrect this topic...

I'd like to overload an object constructor.  The model in question is a Friendship model and I'd like to have a constructor that I simply pass 2 User objects.  Here's what I'm trying that to do that obviously isn't working.


class Friendship < ActiveRecord::Base
  def self.new(user, friend)
    #do stuff
  end
end