1
중첩 된 리소스를 만들었지 만 link_to
은 브라우저에 undefined method 'model_name' for Parking::ActiveRecord_Relation:Class
을 표시합니다. 분명히 잘못 했어. 어떻게 해결할 수 있습니까?레일 링 중첩 리소스
index.rb
<%= link_to 'Create new parking', new_parking_path %></br>
<%= link_to 'Rent place', [@parking, @place_rent]%>
routes.rb는
resources :parkings do
resources :place_rents, :only => [:new, :create]
end