Missing template blogs/index on Ruby on Rails project

前端 未结 6 1338
野的像风
野的像风 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:11

    Here is a stricter response; a suggestion by purp, from the discussion on issue 4127.

    class FooController
      rescue_from  ActionView::MissingTemplate, :with => :missing_template
    
      def missing_template
        render :nothing => true, :status => 406
      end
    end
    

提交回复
热议问题