Here's what the whole error says below:
ContactController#index is missing a template for this request format and variant. request.formats: ["text/html"] request.variant: [] NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.
I'm just trying to connect my contact_controller.rb file to the contact.html.erb view in my rails portfolio. Not exactly sure what code you might need to see. The homepage html code is this below. Specifically when I change the contact me link to what it is now instead of Contact Me
<div class="hero-effect">
<div class="topnav">
<ul class="menu">
<li>
<%= link_to 'Projects', projects_path, class: 'nav-link' %>
</li>
<li>
<%= link_to 'About me', about_index_path, class: 'nav-link' %>
</li>
</ul>
</div>
<div class="hero-text">
<h1>Kyle Williamson</h1>
<h2>Web Developer</h2>
<button>
<%= link_to 'Contact me', contact_index_path, class: 'nav-link', %>
</button>
</div>
</div>
<div class="about">
<div class="about-text">
</div>
</div>
Aucun commentaire:
Enregistrer un commentaire