Your Teacher
Chris Oliver
Hi, I'm Chris. I'm the creator of GoRails, Hatchbox.io and Jumpstart. I spend my time creating tutorials and tools to help Ruby on Rails developers build apps better and faster.
About This Episode
Ever wondered how Rails controllers get their functionality? Let's see how we can add translation support to Rails API controllers by looking at the Rails source
Notes
Rails defines controller functionality in modules. ActionController::Base includes all the default modules while ActionController::API provides a slimmed down version suitable for APIs. In some cases, you may need extra features in your API controllers which means heading to the API docs and Rails source code to find out how it works.
This is a great way to check out the Rails source code and see how it works internally to come up with our solution.