module EngineHelper::ClassMethods
Public Instance Methods
mounted_at()
click to toggle source
Identifies the absolute path (i.e. ‘/’ prefixed) at which an engine is mounted within its parent Rails application. @return [String] the mount path, or nil if not mounted
# 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