Module: ChainGang::ClassMethods

Defined in:
lib/chaingang/chaingang.rb

Instance Method Summary collapse

Instance Method Details

#find_with_chaingang(find_scope = :all) ⇒ Object

the #find method is aliased to this. If you call #find with no arguments, it's assumed you're doing a find(:all). Article.find # defaults to :all Article.find(:first) Article.find(:last) Article.find(:one) Article.find('some-id')



18
19
20
# File 'lib/chaingang/chaingang.rb', line 18

def find_with_chaingang(find_scope = :all)
  Proxy.new(self, find_scope)
end