Rails APIs #4 - Custom Actions

By Josh Justice on Sep 17, 2018


About

How can I create custom controller actions in Rails?

In past screencasts, we’ve set up a simple web service in Rails, deployed it to production, and added authentication. We let Rails generate the logic to perform create, read, update, and delete actions. That's worked well so far, but at some point we’re going to need to adjust or write our own controller code.

In this screencast, we’ll follow up on our previous videos in this series and show you how to rewrite custom controller actions in Rails.

After this screencast, you'll be able to…

- Understand how controllers generated by Rails scaffolding works
- Implement your own controller actions
- Access records in the database
- Specify what data and HTTP status to return
- Understand how Rails run model validations

Basic knowledge or experience building frontend applications is recommended.

For the More Curious...

Rails resourceful routing
Rails controller docs
CRUD with Rails models

Transcript

Transcripts are only available for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Downloads

Project files are only available for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Comments