Step 16


I keep receiving a uninitialized constant AlbumsController::Albums error saying that there is a problem with my code in the albums_controller. My code:

class AlbumsController < ApplicationController

def index
	@albums = Albums.all


Am I missing something? thank you!


Hi Ricardo,

Rails controllers are plural, and models are singular. Album is your model, so it needs to be singular :)

# your current code
@albums = Albums.all
             # ↑ see how it's plural? 

# the correct code
@albums = Album.all
            # ↑ Album is singular now and the code works