I’m using the latest version of ruby and ROR.
I have placed some code in the app/views/layouts/application.html.erb file. Let’s say something like this:
<html>
<head><title>ABC</title></head>
<body>
<%= yield %>
</body>
</html>
I’m having trouble getting the layout to show in my Home page (the only page I have atm).
The Home page is a .html.erb file too, and it contains basic html and rails commands. I have created the controller for it like so:
class HomeController < ActionController::Base
protect_from_forgery
def index
#nothing yet
end
end
What could be the problem?
HomeController is inheriting from ActionController::Base. Make it inherit from ApplicationController. That might help
Change
to