Here are my routes:
namespace :management do
resources :posts do
resources :articles
end
end
This is my simple_form of aricle
<%= simple_form_for [@post, @article],
:url => management_post_articles_path(@post, @article, :format => :js), :remote => true do |f| %>
Here is my create action
def create
options = params[:management_article]
@article = @post.articles.new(handle_post_params(options))
@article.save
end
The problem here is on submitting this form it is expecting create.rjs file instead of create.js.erb
This is what I'm getting
ActionView::MissingTemplate - Missing template management/articles/create, application/create with {:locale=>[:en], :formats=>[:rjs], :handlers=>[:erb, :builder, :haml, :prawn, :prawn_dsl, :prawn_xxx, :rjs]}. Searched in:
Can someone please help me out..
Thanks in advance