Module: EngineHelper::ClassMethods
- Included in:
- RailsDynamicErrors::Engine
- Defined in:
- lib/engine_helper.rb
Instance Method Summary collapse
-
#mounted_at ⇒ String
Identifies the absolute path (i.e. ‘/’ prefixed) at which an engine is mounted within its parent Rails application.
Instance Method Details
#mounted_at ⇒ String
Identifies the absolute path (i.e. ‘/’ prefixed) at which an engine is mounted within its parent Rails application.
8 9 10 11 12 13 |
# File 'lib/engine_helper.rb', line 8 def mounted_at route = Rails.application.routes.routes.detect do |route| route.app == self end route && route.path.spec.to_s end |