Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. ActiveRecord::Associations::CollectionAssociation#* (where * is any number of methods)
  2.  
  3. // flavors_array is an array of all the Flavor objects I want to associate with my ice_cream
  4. ice_cream.flavors = flavors_array
  5.  
  6. @article = Article.all
  7.  
  8. @article = Article.all.include(:category)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement