Я создаю веб-сайт, где пользователь может создать проект.Каждый проект содержит несколько статей.И каждый документ можно «оценить», отправив форму с несколькими вопросами.
Я пытаюсь отобразить simple_form , чтобы показать вопросы, но мне не удается это сделать.
При переходе к: http://0.0.0.0:3000/projects/10/papers/31/answering_questions
я получаю следующую ошибку:

Я знаю, что правильныйбумага и проект передаются в /answering_questions
, потому что если я пишу <%= @paper.title %>
, отображается правильное название статьи.
answerering_questions.html.erb
<h1>Answering questions</h1>
<h4>You are answering the questions for the paper:</h4>
<%= @paper.title %>
<div class="container">
<div class="row ">
<div class="col-sm-6 col-sm-offset-3">
<%= simple_form_for [@project, @paper] do |f| %>
<%= f.input :question_1, :collection =>["N/A", "No - 0", "Partially - 0.5", "Yes - 1"], label: "Question 1" %>
<%= f.input :question_2, :collection =>["N/A", "No - 0", "Partially - 0.5", "Yes - 1"], label: "Question 2" %>
<%= f.input :question_3, :collection =>["N/A", "No - 0", "Partially - 0.5", "Yes - 1"], label: "Question 3" %>
<%= f.association :project, :as => :hidden, label: "To which project are you adding it?", :input_html => { :value => @project } %>
</div>
<div class="form-actions">
<%= f.button :submit, label: "Send your review" %>
</div>
<% end %>
</div>
</div>
Мои маршруты:
Rails.application.routes.draw do
resources :projects do
resources :papers do
member do
get "answering_questions"
end
end
end
devise_for :users
root to: 'pages#home'
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end