Expected to Define It

Super quick post…

The error:

Unable to autoload constant NameOfController, expected path/name_of_controller.rb to define it

is due to the controller file missing the class declaration.

Another note:

Passing a collection to “render” will automatically iterate through the collection:

<% render @user %>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Skip to content