Can anyone explain to me why I am getting this error? Rails is about conventions. Is there a more conventional way of doing what I'm trying to do below?
undefined local variable or method `hello_world' for #<#<Class:...>:...>
Here are my files:
welcome_controller.rb
class WelcomeController < ApplicationController
def hello_world
"Hello, World"
end
end
welcome/index.html.erb
<%= hello_world %>
routes.rb
Rails.application.routes.draw do
get 'welcome/index'
root 'welcome#index'
end