I need you help with my code


#1

Hi, I need you help with my code:

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

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

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

Could you help me?


#2

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


#3

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