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
# File 'lib/prelaunch/helpers.rb', line 3

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

  path = Prelaunch::strip_slashes(Prelaunch.logout_path)
  url  = path

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

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