Class: JsErb::Controller
- Inherits:
-
ActionView::Base
- Object
- ActionView::Base
- JsErb::Controller
- Defined in:
- lib/js_erb/controller.rb
Instance Method Summary collapse
-
#compile! ⇒ Object
Runs the compile process.
Instance Method Details
#compile! ⇒ Object
Runs the compile process.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/js_erb/controller.rb', line 8 def compile! if defined?(Rails) if (Rails.env.development? || Rails.env.test? || !File.exists?(JsErb.config['path']['compiled'])) Rails.logger.info '[JsErb] Compiling javascript ...'; prepare_path compile_source_files compile_locales compile_views Rails.logger.info '[JsErb] Done!'; true end end end |