Validations, Scopes, & Callbacks

Ruby on Rails 4.2
  • 14 Videos | 57m 51s
  • Earns a Badge
Likes 2 Likes 2
In Rails, models are the gateway to the database. Here you'll learn how to perform validations, and work with virtual models including model callbacks.

WHAT YOU WILL LEARN

  • perform model validation
    use conditional validation
    use custom validators in models
    use custom validators in classes
    compare using the errors[] with the invalid? method
    recall what methods do not invoke validations
    protect against attacks by controlling mass-assignment attributes
  • recall how to run an unscoped query and why you might need to do so
    chain scopes with lambdas
    load all the specified associations with the minimum number of queries
    use active model
    use conditional callbacks
    use transaction callbacks
    use ActiveRecord to model data

IN THIS COURSE

  • Playable
    1. 
    Defining Model Validation
    3m 10s
    UP NEXT
  • Playable
    2. 
    Using Conditional Validation
    2m 8s
  • Locked
    3. 
    Using Custom Validators in Models
    3m 33s
  • Locked
    4. 
    Using Custom Validators in Classes
    4m 17s
  • Locked
    5. 
    Working with ActiveRecord Errors
    3m 23s
  • Locked
    6. 
    Skipping Validations
    1m 57s
  • Locked
    7. 
    Controlling Mass-assignment Attributes
    4m 3s
  • Locked
    8. 
    Using Scopes
    4m 23s
  • Locked
    9. 
    Using Scopes with Lambda
    2m 37s
  • Locked
    10. 
    Loading Associated Records of Objects
    3m 47s
  • Locked
    11. 
    Using Active Model
    6m 8s
  • Locked
    12. 
    Using Conditional Callbacks
    4m 27s
  • Locked
    13. 
    Using Transaction Callbacks
    3m 49s
  • Locked
    14. 
    Exercise: Modeling Data with ActiveRecord
    9m 37s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Likes 2 Likes 2  
COURSE ActiveRecords
Likes 4 Likes 4