レール3.2.11
Gemfile:
gem 'jquery-rails'
gem "best_in_place"
aplication.js
//= require jquery
//= require jquery_ujs
//= require best_in_place
post.js.coffee
jQuery ->
$('.best_in_place').best_in_place()
show.html.erb
<%= best_in_place @post, :title %>
インラインフォームが表示されましたが、js 例外が発生し、入力時に何も起動されず、フォーカスが緩んでいるなどのトレースバック:
Uncaught SyntaxError: Unexpected token u jquery.js:525
jQuery.extend.parseJSON jquery.js:525
BestInPlaceEditor.setHtmlAttributes best_in_place.js:265
BestInPlaceEditor.forms.input.activateForm best_in_place.js:309
BestInPlaceEditor.activate best_in_place.js:54
BestInPlaceEditor.clickHandler best_in_place.js:260
jQuery.event.dispatch jquery.js:3046
elemData.handle
jquery.js の行
if ( window.JSON && window.JSON.parse ) {
return window.JSON.parse( data );
どうすればこれを修正できますか?
アップデートの問題が解決しました。同じ変更を行いますが、すべて正常に動作します。マジック ;)