Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/health_check/health_check_routes.rb
Instance Method Summary collapse
Instance Method Details
#add_health_check_routes(prefix = nil) ⇒ Object
9 10 11 12 |
# File 'lib/health_check/health_check_routes.rb', line 9 def add_health_check_routes(prefix = nil) HealthCheck.uri = prefix if prefix match "#{HealthCheck.uri}(/:checks)(.:format)", controller: 'health_check/health_check', action: :index, via: [:get, :post], defaults: { format: 'txt' } end |
#health_check_routes(prefix = nil) ⇒ Object
4 5 6 7 |
# File 'lib/health_check/health_check_routes.rb', line 4 def health_check_routes(prefix = nil) HealthCheck::Engine.routes_explicitly_defined = true add_health_check_routes(prefix) end |