RailsCasts Pro episodes are now free!

Learn more or hide this

BigBoy1337's Profile

GitHub User: BigBoy1337

Comments by

Avatar

nvm I fixed it by adding resources:messages to my routes.rb file

Avatar

I keep getting an error saying

undefined method `new_message_path'

This is in app/views/messages/_messages.html.erb

for

<%= link_to "Reply", new_message_path(:parent_id => message) %>
<% if current_user?(message.user) %>
<%= link_to "delete", message, method: :delete,
confirm: "You sure?",
title: message.content %>
<% end %>

Any idea where to define new_message_path? I tried adding

def new_message_path
end

in app/controllers/message/controllers

but it didnt work