Skip to content

Commit 05fd1db

Browse files
committed
Merge branch 'precompile_assets' of https://github.com/taavo/bootstrap-wysihtml5-rails
2 parents 41838fb + 2145bf0 commit 05fd1db

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ Or just add the ones that you want
6262
//= require bootstrap-wysihtml5/locales/es-ES
6363
```
6464

65-
Rails compiles and minify all stylesheets into a single file. We need `bootstrap-wysihtml5/wysiwyg-color.css` to be available as a single file.
66-
Modify `config/environments/production.rb` to contain:
67-
68-
```
69-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
70-
config.assets.precompile += %w( bootstrap-wysihtml5/wysiwyg-color.css )
71-
```
72-
7365
You may need to restart your rails server.
7466

7567
## Using bootstrap-wysihtml5-rails
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module BootstrapWysihtml5Rails
22
module Rails
33
class Engine < ::Rails::Engine
4+
initializer "BootstrapWysihtml5Rails precompile hook", :group => :all do |app|
5+
app.config.assets.precompile += %w(bootstrap-wysihtml5.css bootstrap-wysihtml5.js bootstrap-wysihtml5/wysiwyg-color.css)
6+
end
47
end
58
end
69
end

0 commit comments

Comments
 (0)