diff --git a/app/views/shared/_publisher.html.haml b/app/views/shared/_publisher.html.haml index 5bffab311..bad7cd6d6 100644 --- a/app/views/shared/_publisher.html.haml +++ b/app/views/shared/_publisher.html.haml @@ -19,7 +19,7 @@ = "(#{@aspect_ids.length} #{t('_aspects').downcase})" .content_creation - = form_for(StatusMessage.new, :remote => true) do |status| + = form_for(StatusMessage.new, :remote => true, :html => {"data-type" => "json"}) do |status| = status.error_messages #file-upload = image_tag 'icons/photos.png' diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index 67daae24f..1306832fb 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -52,7 +52,6 @@ var Stream = { }); $(".new_status_message").live('ajax:success', function(data, json, xhr) { - json = $.parseJSON(json); WebSocketReceiver.addPostToStream(json.post_id, json.html); //collapse publisher Publisher.close();