How to fix ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil} when visiting the moderator page? [closed] Question
Closed as not constructive by Trilarion on Jan 13, 2022 at 21:33
This question cannot be answered in a way that is helpful to anyone. It's not possible to learn something from possible answers, except for the solution for the specific problem of the asker.
This question was closed; new answers can no longer be added. Users with the reopen privilege may vote to reopen this question if it has been improved or closed incorrectly.
In a fresh development instance I went to http://localhost:3000/mod
and got a 500 Server Error related to
ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}, possible unmatched constraints: [:post_type]):
34: <div class="widget">
35: <div class="widget--body">
36: <i class="fas fa-file-alt"></i>
37: <%= link_to 'Create Help Page', new_post_path(post_type: HelpDoc.post_type_id) %>
38: </div>
39: </div>
40: </div>
app/views/moderator/index.html.erb:37:in `_app_views_moderator_index_html_erb___3348426895881517021_62660'
How can I fix this?
It might be related to How can I add post types to a category?
P.S.: I redid the setup of QPixel and this error is not reproducible even though the db:seed error still is. Will close as "not constructive".
0 comment threads