Class: Locomotive::Steam::PageRedirectionService

Inherits:
Object
  • Object
show all
Defined in:
lib/locomotive/steam/services/page_redirection_service.rb

Instance Method Summary collapse

Instance Method Details

#redirect_to(handle, locale = nil) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/locomotive/steam/services/page_redirection_service.rb', line 8

def redirect_to(handle, locale = nil)
  if page_url = url_to(handle, locale)
    raise Locomotive::Steam::RedirectionException.new(page_url)
  else
    false
  end
end