Josh Justice

Rails APIs (Part 4) - Custom Actions

Josh Justice | Sep 17, 2018

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

Subscribers Only

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

Subscribers Only

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

Need Help?

If you get stuck, try starting a discussion with Big Nerd Ranch experts in the community tab.

Skill Pack

This screencast is part of a skill pack called Easy Backend APIs with Rails.

Related Screencasts

Explore other screencasts related to this topic.