rails 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 %>
the inline form is being scanned, but I got a js exception and didnβt run anything on login, focus loss, etc. traceback:
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
in jquery.js
if ( window.JSON && window.JSON.parse ) {
return window.JSON.parse( data );
how can i fix this?
update problem . make the same changes, but everything works fine. magic;)
source
share