diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-08-18 20:31:17 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-08-18 20:31:17 +0000 |
commit | d97c83096a70ed102f993d4c484aff9c786ca831 (patch) | |
tree | 9dcbc54326533c8cfdd7dbedaccc4b4e32dc31c5 /app/assets/javascripts/application.js | |
parent | 07989af1ef9c86a0c25513a7735133db4fbd5719 (diff) | |
parent | b73ff13e8a1c406d162721895687659d9e11c7a8 (diff) | |
download | gitlab-ce-d97c83096a70ed102f993d4c484aff9c786ca831.tar.gz |
Merge branch '3225-ace-editor-causing-404-errors-every-time-you-try-to-edit-a-file-in-the-webui' into 'master'
Fix Ace syntax highlighting with compiled assets
## What does this MR do?
Update ACE to 4.1.0 to allow modes (syntax highlighting files for particular languages) to be lazily loaded.
## Are there points in the code the reviewer needs to double check?
Don't think so.
## Why was this MR needed?
Syntax highlighting in the file editor only worked in development and test modes, not in production!
## What are the relevant issue numbers?
Closes #3225.
## Screenshots (if relevant)
First, the test setup - add these lines to `development.rb`:
```ruby
config.assets.debug = false
config.assets.compile = false
config.assets.digest = true
```
Then, before starting the server, run `bundle exec rake assets:clobber assets:precompile`.
Before:

There is an error in the console because `/assets/ace/mode-ruby.js` was not found (it's only available when assets are compiled on demand).
After:

This loads `/assets/ace/mode-ruby-3915f95a6cc47306b1305e4dcb7aca25b2ef9c49b18ec6011707135b6575d8f3.js`, which works because the precompile step included it and told ACE where to find it.
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~API support added~~
- Tests
- ~~Added for this feature/bug~~
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5501
Diffstat (limited to 'app/assets/javascripts/application.js')
-rw-r--r-- | app/assets/javascripts/application.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 85ec52cee37..f6e8e770527 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -26,7 +26,7 @@ /*= require bootstrap/tooltip */ /*= require bootstrap/popover */ /*= require select2 */ -/*= require ace/ace */ +/*= require ace-rails-ap */ /*= require ace/ext-searchbox */ /*= require underscore */ /*= require dropzone */ |