I need you help with my code


Hi, I need you help with my code:

My routes.rb file
rails.application.routes.draw do
get '/pages/home' => 'pages#home'

My application_controller.rb file
class ApplicationController < ActionController::Base
def home

When I try to view the page, I have this error message: Routing Error uninitialized constant PagesController

Could you help me?


Hi @gglopes,

You're missing an end at the end of the application_controller.rb file, and def home...end belongs in pages_controller.rb, not application_controller.rb


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.