Missing template blogs/index on Ruby on Rails project

前端 未结 6 1335
野的像风
野的像风 2020-12-29 09:11

For one of my projects I\'m getting this exception every now and then:

ActionView::MissingTemplate: Missing template blogs/index with {:handlers=>[:rx

6条回答
  •  [愿得一人]
    2020-12-29 10:09

    I agree about blocking the offending robot, but if you really want to force the response format add a before_filter and set request.format = :html, like this:

    before_filter :force_request_format_to_html
    
    private
    
    def force_request_format_to_html
      request.format = :html
    end
    

提交回复
热议问题