Closed kenzo-tanaka closed 2 years ago
Generate a namespace controller with --model-name option.
--model-name
$ rails g model article title:string $ rails db:migrate $ rails g scaffold_controller admin/articles --model-name=article
This is a sample code. https://github.com/kenzo-tanaka/rails_sandbox/pull/15
Some paths are not what I expected.
views/admin/articles/index.html.slim
tbody - @articles.each do |article| tr td = link_to 'Edit', edit_admin_article(article)
app/views/admin/articles/show.html.slim
=> link_to 'Edit', edit_admin_article(@article)
Rails version: 6.1.4 Ruby version: 2.6.3p62
Steps to reproduce
Generate a namespace controller with
--model-name
option.This is a sample code. https://github.com/kenzo-tanaka/rails_sandbox/pull/15
Expected behavior
Some paths are not what I expected.
views/admin/articles/index.html.slim
app/views/admin/articles/show.html.slim
Actual behavior
System configuration
Rails version: 6.1.4 Ruby version: 2.6.3p62