Ruby on Rails 8 · Generators

Generate a controller

Create a controller with index and show actions and their views.

bin/rails generate controller Articles index show

Official Ruby on Rails 8 documentation

More generators commands

All generators commands · Ruby on Rails 8 cheatsheet

Was this page helpful?