Module: Prelaunch::Helpers

Defined in:
lib/prelaunch/helpers.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/prelaunch/helpers.rb', line 3

def prelaunch_logout_link name = nil, html_options = nil, &block
  return unless Prelaunch::valid_env?

  path = Prelaunch::strip_slashes(Prelaunch.path)
  url  = "#{path}/logout"

  html_options = name if block_given?
  html_options ||= {}
  html_options[:rel] = 'nofollow'
  html_options['href'] ||= url

  (:a, name || url, html_options, &block)
end