find in model

Below used in definition

Model Employee -------------- def self.list find(:all) end

In some case it is used inside

Model Employee -------------- def list self.find(:all) end

So please let me know what is the reason behind this, using in two different way

self is the implicit receiver, ie calling self.find(:all) is the same as calling find(:all). Sometimes it is useful to make it obvious what you are doing

def self.list ... end

creates a class method. The second example you gave probably wouldn't run, unless the model had an instance method called find. More likely is that you find something like that inside a

class << self   def list     ...   end end

in which case it is identical to the first example

Fred