From f96fc5834fb3ed006e472453870abc7ed2046e1c Mon Sep 17 00:00:00 2001 From: Steven Hancock Date: Sat, 24 Mar 2012 17:53:55 -0700 Subject: [PATCH] Make the Mention button work with the asset pipeline * Fix the javascript_include_tag in the status_messages/new view * Precompile pubhlsiher.js and jquery.textchange.min.js This fixes a 500 error that was being thrown when the Mention button was clicked, due to the above two javascripts not being precompiled and a javascript include that needed to be updated to load jquery.textchange.js from the correct path. --- app/views/status_messages/new.html.haml | 2 +- config/application.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/status_messages/new.html.haml b/app/views/status_messages/new.html.haml index c816c5af1..1ddeb6089 100644 --- a/app/views/status_messages/new.html.haml +++ b/app/views/status_messages/new.html.haml @@ -1,7 +1,7 @@ -# Copyright (c) 2010-2011, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -= javascript_include_tag 'vendor/jquery.textchange.min.js', "publisher.js" += javascript_include_tag 'jquery.textchange.min.js', "publisher.js" :javascript $(function() { diff --git a/config/application.rb b/config/application.rb index 5e4384a32..f8850108c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -76,9 +76,9 @@ module Diaspora # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # Javascripts config.assets.precompile += [ "contact-list.js", "finder.js", "home.js", - "ie.js", "inbox.js", "jquery.js", "jquery_ujs.js", "login.js", "mailchimp.js", - "main.js", "mobile.js", "profile.js", "people.js", "photos.js", "templates.js", - "validation.js" ] + "ie.js", "inbox.js", "jquery.js", "jquery_ujs.js", "jquery.textchange.min.js", + "login.js", "mailchimp.js", "main.js", "mobile.js", "profile.js", + "people.js", "photos.js", "publisher.js", "templates.js", "validation.js" ] # Stylesheets config.assets.precompile += [ "blueprint.css", "bootstrap.css", "default.css",