Validations, Scopes, & Callbacks
Ruby on Rails 4.2
| Intermediate
- 14 videos | 57m 21s
- Earns a Badge
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 validationUse conditional validationUse custom validators in modelsUse custom validators in classesCompare using the errors[] with the invalid? methodRecall what methods do not invoke validationsProtect against attacks by controlling mass-assignment attributes
-
Recall how to run an unscoped query and why you might need to do soChain scopes with lambdasLoad all the specified associations with the minimum number of queriesUse active modelUse conditional callbacksUse transaction callbacksUse activerecord to model data
IN THIS COURSE
-
3m 10sDuring this video, you will learn how to validate your model. FREE ACCESS
-
2m 8sIn this video, you will learn how to use conditional validation. FREE ACCESS
-
3m 33sIn this video, you will learn how to use custom validators in your models. FREE ACCESS
-
4m 17sFind out how to use custom validators in classes. FREE ACCESS
-
3m 23sDuring this video, you will learn how to compare using the errors[] method with the invalid? method. FREE ACCESS
-
1m 57sUpon completion of this video, you will be able to recall what methods do not invoke validations. FREE ACCESS
-
4m 3sIn this video, you will learn how to protect against attacks by controlling mass-assignment attributes. FREE ACCESS
-
4m 23sUpon completion of this video, you will be able to recall how to run a query without a scope and why you might need to do so. FREE ACCESS
-
2m 37sIn this video, find out how to chain scopes with lambdas. FREE ACCESS
-
3m 47sIn this video, you will learn how to load all the specified associations with the minimum number of queries. FREE ACCESS
-
6m 8sLearn how to use the active model. FREE ACCESS
-
4m 27sIn this video, learn how to use conditional callbacks. FREE ACCESS
-
3m 49sIn this video, you will learn how to use transaction callbacks. FREE ACCESS
-
9m 37sDuring this video, you will learn how to use ActiveRecord to model data. FREE ACCESS
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.