Class: Teaspoon::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Teaspoon::Engine
show all
- Defined in:
- lib/teaspoon/engine.rb
Defined Under Namespace
Modules: ExceptionHandling
Class Method Summary
collapse
Class Method Details
.add_precompiled_assets(assets) ⇒ Object
48
49
50
|
# File 'lib/teaspoon/engine.rb', line 48
def self.add_precompiled_assets(assets)
assets.precompile += Teaspoon.configuration.asset_manifest
end
|
.append_asset_paths(assets) ⇒ Object
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/teaspoon/engine.rb', line 37
def self.append_asset_paths(assets)
Teaspoon.configuration.asset_paths.each do |path|
assets.paths << Teaspoon.configuration.root.join(path).to_s
end
Teaspoon::Framework.available.keys.each do |framework|
assets.paths += Teaspoon::Framework.fetch(framework).asset_paths
end
end
|
.default_root_path(root) ⇒ Object
33
34
35
|
# File 'lib/teaspoon/engine.rb', line 33
def self.default_root_path(root)
Teaspoon.configuration.root ||= root
end
|
.inject_instrumentation ⇒ Object
.prepend_routes(app) ⇒ Object
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/teaspoon/engine.rb', line 60
def self.prepend_routes(app)
mount_at = Teaspoon.configuration.mount_at
return if app.routes.recognize_path(mount_at)[:action] != "routing_error" rescue nil
ActiveSupport.on_load(:action_controller) do
require Teaspoon::Engine.root.join("app/controllers/teaspoon/suite_controller")
end
app.routes.prepend { mount Teaspoon::Engine => mount_at, as: "teaspoon" }
end
|