0

I have the following three models:

Article
Article::Line (lines of the article)
Article::Review (reviews of a line)

I want to have a route that is

/articles/11/line/2/review/new
/articles/11/line/2/review/edit

My route.rb

  resources :articles do
    scope module: 'article' do
      resources :lines do
        resources :reviews
      end
    end
  end

I am trying to make the form_for work with both new and edit automatically:

<%= form_for [ @line.article, @line, @review ] do |f| %>

However this will produce undefined method `article_article_line_article_reviews_path' error.

What have I done wrong, or is this possible?

4

0 回答 0