for those as stupid as me, it should have been old_find(*args)
shodhan wrote:> Hi
> In my pursuit for adding some extra features to AR`s find method, i
> first (tried) aliasing it and thats where i am still stuck at.
> First i aliased the method
>
> class Sample < ActiveRecord::Base
>
> class << self
> alias :old_find :find
> end
> end
>
>
> Sample.find(:all) and Sample.old_find(:all) both return the same results
> good.
> next,
>
> class Sample < ActiveRecord::Base
>
> class << self
> alias :old_find :find
> end
>
> def self.find(*args)
> self.old_find(args)
> end
> end
>
> Now Sample.old_find works fine but Sample.find just freezes everything.
> My hunch is that self.old_find(args) is not the right way of passing the
> arguments.
> If it is so or otherwise, please enlighten me
> thanx in advance
> shodhan