Ruby on rails 3.2 缺少模板应用程序/刷新联机错误

Ruby on rails 3.2 缺少模板应用程序/刷新联机错误,ruby-on-rails-3.2,Ruby On Rails 3.2,我正在应用程序控制器类中编写一个方法 ApplicationController < ActionController::Base protect_from_forgery def refreshonline end end ApplicationController[:en],:formats=>[:html],:handlers=>[:erb,:builder,:coffee]}。搜索位置:““D:/bitnami/test/projects/online/app

我正在应用程序控制器类中编写一个方法

ApplicationController < ActionController::Base 
  protect_from_forgery

  def refreshonline 
  end

end
ApplicationController
并将视图放在app/views/layout/refreshonline.html.erb中。此文件仅包含简单的html

但是当我运行这个方法时,它会给我错误
缺少模板应用程序/refreshonline,带有{:locale=>[:en],:formats=>[:html],:handlers=>[:erb,:builder,:coffee]}。搜索位置:““D:/bitnami/test/projects/online/app/views”


因此,我正在将html文件放在正确的位置,或者需要放在其他地方???

如果将refreshonline.html.erb向上移动一级到“视图”文件夹中,这将起作用

更好的做法是为资源包含一个新的控制器,并将视图移动到一个同名的文件夹()