I am fairly new to rails and had a question.
I am wanting to direct my controller to point to the html.erb view i created.
I have tried various versions of:
def index
render :"viewName"
end
def index
render :viewName
end
def index
render : "viewName.html.erb"
end
My router is set as such:
Rails.application.routes.draw do
root 'application#index'
end
/app/views/application/index.html.erbfolder. And your Application controller shows an index action (even empty)def index endthen the view should be shown. (though Application controller is usually empty because it intuitively should do Nothing, there is no logic showing the index of an application. If you had a User model and controller then it makes sense to have an User#index which should return a list of users)