Class: Torba::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Torba::Engine
- Defined in:
- lib/torba/rails.rb
Class Method Summary collapse
- .precompile_assets? ⇒ Boolean
- .serve_static_files?(config = Rails.application.config) ⇒ Boolean
- .setup(config = Rails.application.config) ⇒ Object
Class Method Details
.precompile_assets? ⇒ Boolean
15 16 17 |
# File 'lib/torba/rails.rb', line 15 def self.precompile_assets? defined?(Rake.application) && Rake.application.top_level_tasks.include?("assets:precompile") end |
.serve_static_files?(config = Rails.application.config) ⇒ Boolean
8 9 10 11 12 13 |
# File 'lib/torba/rails.rb', line 8 def self.serve_static_files?(config = Rails.application.config) (config.respond_to?(:public_file_server) && config.public_file_server.enabled) || (config.respond_to?(:serve_static_files) && config.serve_static_files) || # Rails 4 (config.respond_to?(:serve_static_assets) && config.serve_static_assets) || # Rails 3 ENV["RAILS_GROUPS"] == "assets" # Rails 3 end |