I’m using acts-as-messageable, a rails gem, in an app i have.
However in my messages_controller i have
def new
@message = ActsAsMessageable::Message.new
end
and in my view i have
<%= form_for(@message) do |f| %>
which throws the following error
undefined method `acts_as_messageable_messages_path’
I’m not really sure why this is happening with the gem.
Try explicitly stating what path you want the form to point towards (which should be the
messages#createaction):This assumes that you have this in your
routes.rbfile:Also, make sure you are passing in the required fields to ActsAsMessageable: https://github.com/LTe/acts-as-messageable/wiki/Example-controller