Skip to content

Instantly share code, notes, and snippets.

@danielcooper
Created August 12, 2012 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielcooper/3332092 to your computer and use it in GitHub Desktop.
Save danielcooper/3332092 to your computer and use it in GitHub Desktop.
Chaining example
##AR 2
Person.find(:all, :conditions => {:name => "Joe", :is_admin => true}, :limit => 10)
##=> Array
#AR 3
Person.where(:name => 'joe', :is_admin => true).limit(10)
##=> ActiveRecord::Relation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment