Rails Models


Not CompletedPurpose of Model Files in Rails

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.

Not CompletedCreating Custom Model Files in a Rails 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.

Not CompletedCustom Scopes in Model Files in a Rails Application

In this lesson, we are going to talk about adding custom scopes to models in a Ruby on Rails application.

Not CompletedSetting Defaults in a 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.

Not CompletedHow to Integrate Validations in Ruby on Rails

In this lesson, we are going to talk about validating data in the model for Rails apps.

Not CompletedGenerating a Model in Rails

Now that we've created scopes, made validations and did callbacks, it's time to see how all of this fits together.

Not CompletedSetting up Database Associations in Rails

Learn how to configure database relationships between models in a Ruby on Rails application.

Not CompletedHow to Add a Boolean Column to a Database Table in Rails using a Migration

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.

Not CompletedHow to Integrate Advanced Callbacks in Rails

In this lesson, we are going to learn to do conditional callbacks for our tasks.

Unsupported Browser

devCamp does not support ancient browsers.
Install a modern version for best experience.