Home>

I want to render the index of Admins :: LanguageTagsController when create fails in Admins :: FrameworkTagsController, but it doesn't work.

Missing template language_tags/index with {: locale =>[: en],: formats =>[: html],: variants =>[],: handlers =>[: raw,: erb,: html,: builder,: ruby,: coffee,: jbuilder]}. Searched in: * "/ app_name/app/views" * "/ usr/local/bundle/gems/kaminari-core-1.2.1/app/views" * "/ usr/local/bundle/gems/devise-4.7.3/app/views "
Corresponding source code
class Admins :: FrameworkTagsController


What I tried

We have confirmed the existence of the view page (language_tags/index.html.erb) corresponding to the controller specified in render.

  • Answer # 1

    To summarize the question, it is said that there is views/admins/language_tags/index.html.erb, but since it is called language_tags/index.html.erb in the render template syntax, unless it is routed directly under admin You have called a template in a hierarchy that does not exist.

    class Admins :: FrameworkTagsController

    Therefore, it is necessary to either adjust by routing or match the path of render_template.