Ruby on rails 3.1 我怎样才能得到最好的位置';让我们用bip工作来回应你?

Ruby on rails 3.1 我怎样才能得到最好的位置';让我们用bip工作来回应你?,ruby-on-rails-3.1,best-in-place,Ruby On Rails 3.1,Best In Place,我很难让最佳位置完全发挥作用。问题是,一旦我编辑了一个字段,为了能够再次单击并编辑该字段,我需要刷新页面。我可能错了,但我有一种感觉,这与respond\u with_bip抛出未定义方法错误有关。我认为这与没有将最好的资产放在正确的位置有关。目前我有以下更新“常量”的方法。但当它点击respond\u with_bip时,它再次抛出一个错误: 显示: <%= best_in_place constant, :description %> def update @constan

我很难让
最佳位置
完全发挥作用。问题是,一旦我编辑了一个字段,为了能够再次单击并编辑该字段,我需要刷新页面。我可能错了,但我有一种感觉,这与
respond\u with_bip
抛出
未定义方法
错误有关。我认为这与没有将
最好的资产放在正确的位置有关。目前我有以下更新“常量”的方法。但当它点击
respond\u with_bip
时,它再次抛出一个错误:

显示:

<%= best_in_place constant, :description %>
def update
  @constant = Constant.find(params[:id])

  respond_to do |format|
    if @constant.update_attributes(params[:constant])
      format.html { 
        flash[:success] = "Constant Updated"
        redirect_to settings_path
      }
      format.json { 
        respond_with_bip(@constant) 
      }
    else
      format.html { 
        flash[:error] = "Constant Update Failed"
        @title = "Constants"
        @constant = Constant.new
        @partial_path = "settings/constants"
        redirect_to settings_path
      }
      format.json { respond_with_bip(@constant) }
    end
  end
end
关于
best_In_place
的github页面中的文件夹,我将整个
lib/best_In_place
文件夹放在我的应用程序的
app/assets
文件夹中。javascript文件位于
app/assets/javascripts
中(这些文件工作正常,不用担心)。我把
lib/assets/best\u in_place.rb
文件放在
config/initializers
文件夹中

我做错了什么?

这可能会有所帮助。从我在那里看到的,它看起来是一个空白,这是抛出你得到的错误。如果您不需要使用它,您可以始终使用:

redirect_to @constant