-
Notifications
You must be signed in to change notification settings - Fork 0
railscasts/181-include-vs-joins
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Railscasts Episode #181: Include vs Joins http://railscasts.com/episodes/181 script/console c = Comment.all(:joins => :user, :conditions => { :users => { :admin => true } }) c.first.users c = Comment.all(:include => :user, :conditions => { :users => { :admin => true } }) c.first.users User.all(:joins => :comments, :select => "users.*, count(comments.id) as comments_count", :group => "users.id") g = Group.first Comment.all(:joins => {:user => :memberships}, :conditions => { :memberships => { :group_id => g.id } })
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published