module ApplicationHelper

  # Returns the full title on a per-page basis.
  def full_title(page_title)
    base_title = "JamKazam"
    if page_title.empty?
      base_title
    else
      "#{base_title} | #{page_title}"
    end
  end

  def self.base_uri(request)
    (request.ssl? ? "https://" : "http://") + request.host_with_port
  end

  def bugsnag?
    Rails.application.config.bugsnag_notify_release_stages.include? Rails.env
  end

end
