In this lesson, we are going to talk about model files and how we can use them in Ruby. As a first step, we need to understand what are model files and what is their purpose in an application.
Since model files can be a little confusing for beginners, I'm going to create a model class that is not attached to ActiveRecord. This is a little unconventional and not done in live projects, but I'm doing this to help you better understand model files.
In this lesson, we are going to talk about adding custom scopes to models in a Ruby on Rails application.
Rails gives you quite a few ways to set default values in an application, we'll cover the two most popular ways in this lesson.
In this lesson, we are going to talk about validating data in the model for Rails apps.
Now that we've created scopes, made validations and did callbacks, it's time to see how all of this fits together.
Learn how to configure database relationships between models in a Ruby on Rails application.
Walk through how to using the migration generator to add a column with the boolean data type to a database table in a Ruby on Rails application.
In this lesson, we are going to learn to do conditional callbacks for our tasks.
devCamp does not support ancient browsers.
Install a modern version for best experience.