Active Record II

Topics 

  • Scope
  • Locking 
  • Calculations 
  • Callback methods

Scope

What is Scope? 

  • Scoping allows you to specify commonly-used queries which can be referenced as method calls on models or association objects 
    • With these scopes, you can use every method previously covered such as where, joins and includes 
    • All scope methods will return an ActiveRecord::Relation object which will allow for chaining further methods (such as other scopes)

You must have an active subscription to download PDF and Lab Zip of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.