Sha256: ecad039566c948b4cd82dea8d24934a95030823595075bb14cd4304e8b6c6830

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

module ApplicationHelper
  
  def li_link_to_current(name, controller)
    if current_page?(:controller => controller)
      str = '<li class="current">' + link_to(name,controller) + '</li>'
    else
      str = '<li>' + link_to(name,controller) + '</li>'
    end
    str.html_safe
  end
  
  def show_accounts
    User.account_name_with_uuid(@current_user.uuid)
  end
  
  def primary_account_id
    User.primary_account_id(@current_user.uuid)
  end

  def nl2br(text)
    text.gsub(/(<.*?>)/, '').gsub(/\n/, '<br />').html_safe
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wakame-vdc-webui-10.12.0 app/helpers/application_helper.rb
wakame-vdc-webui-10.11.0 app/helpers/application_helper.rb