I am using the monologue gem and trying to create an email list signup form on one of the monologue pages. Here is the code:
<%= form_for EmailList.new, url: email_lists_path, remote: true, class: 'form-horizontal' do |f| %>
<%= f.text_field :email, id: 'userid', class: 'form-control input-medium email-field', placeholder: 'email', required: "" %>
<%= f.submit "Sign In", class: 'btn btn-success' %>
<% end %>
and here is how the route is defined when i run rake routes
:
email_lists POST /email_lists(.:format) email_lists#create
So it should be working but instead I get this error:
undefined local variable or method `email_lists_path' for #<#<Class:0x007fdddf519a40>:0x007fdde482bd78>
It has something to do with how the monologue engine is mounted:
mount Monologue::Engine, at: '/blog'
Any way, how do I add routes that work within the blog?