Lesson 5/7 Step 7 Need help please


#1

https://www.codecademy.com/en/courses/learn-rails/lessons/one-model/exercises/one-model-create-messages-i

I don't know what am I doing wrong, the instructions say below the block:
<% @messages.each do |message| %>...<%end%>

add

<%= link_to 'New Message',
"messages/new" %>

but the following Error appears:

Make sure to add the 'link_to' to app/views/messages/index.html.erb

And I am quite sure I am putting that code line in that file


#2

Perhaps try writing it on one line.

<%= link_to 'New Message', "messages/new" %>

#3

Thank you! :smiley: it worked for me


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.