Weird “406 not acceptable” error

前端 未结 12 1142
南方客
南方客 2020-11-27 05:38

When I try to hit this action via Javascript, I get a 406 Not Acceptable error:

  def show
    @annotation = Annotation.find_by_id(params[:id])
         


        
12条回答
  •  暖寄归人
    2020-11-27 06:07

    For me it was a simple before_filter that was restricting a action that renders a js file, once I added the :except => [:action] to the before_filter block it was fine.

提交回复
热议问题