Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

BigBoy1337's Profile

GitHub User: BigBoy1337

Comments by


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


I keep getting an error saying

undefined method `new_message_path'

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


<%= 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

in app/controllers/message/controllers

but it didnt work