Skip to content

View files generated by scaffold cause ActionView::MissingTemplate when the Model name is nested #227

Closed
@ttanimichi

Description

@ttanimichi

View files generated by scaffold cause ActionView::MissingTemplate when the Model name is nested.

$ rails new myapp --css=tailwind
$ cd myapp
$ bin/rails generate scaffold Foo/Bar title:string body:text
$ bin/rails db:migrate
$ bin/rails r 'Foo::Bar.create'
$ bin/rails s
$ curl -is http://localhost:3000/foo/bars | grep MissingTemplate
    ActionView::MissingTemplate in
</div><div class="line active">        raise(MissingTemplate.new(self, path, prefixes, partial, details, details_key, locals))

Probably this line is wrong, and singular_name should be used instead of singular_table_name like rails/rails, but I'm not 100% sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions