我有一个TasksController和一个SubtasksController。在SubtasksController的某个操作中,我想要:
# app/controllers/tasks_controllers.rb
render 'tasks/index' # Or: render template: 'tasks/index'
当在视图中调用该操作时,Rails似乎试图呈现错误的部分:
ActionView::Template::Error (Missing partial subtasks/tasks, private_area/tasks, application/tasks with {:locale=>[:ca, :es], :formats=>[:js, :html], :handlers=>[:erb, :builder, :slim, :jbuilder, :coffee, :haml]}. Searched in:
* "/Users/****/app/views"
我真的不明白这里发生了什么事情,你有什么想法吗?
render '/tasks/index'
,这有帮助吗? - Bjoernsen