My questions is really simple:
How can I render the application.html.erb
view in a rails app?
I've tried adding a method to the application.controller.js
files:
def amethod
end
And then updating the routes.rb
file:
get '/', to: 'application#amethod'
to no avail. I get this error message:
Missing template application/amethod with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in: * "/Users/peterward/Directory/mini-project/app/views"
It's looking for the html.erb
view in the app/layouts/views
directory instead of the app/layouts
directory. How can I change this?
Thanks!
Peter
Aucun commentaire:
Enregistrer un commentaire