Module: ApplicationHelper

Defined in:
app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
8
9
10
# File 'app/helpers/application_helper.rb', line 3

def li_link_to_current(name, controller_name, action_name)
  if current_page?(:controller => controller_name)
    str = '<li class="current">' + link_to(name, {:controller => controller_name, :action => action_name}) + '</li>'
  else
    str = '<li>' + link_to(name, {:controller => controller_name, :action => action_name}) + '</li>'
  end
  str.html_safe
end

#nl2br(text) ⇒ Object



20
21
22
# File 'app/helpers/application_helper.rb', line 20

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

#primary_account_idObject



16
17
18
# File 'app/helpers/application_helper.rb', line 16

def 
  User.(@current_user.uuid)
end

#show_accountsObject



12
13
14
# File 'app/helpers/application_helper.rb', line 12

def show_accounts
  User.(@current_user.uuid)
end

#user_last_login_atObject



24
25
26
# File 'app/helpers/application_helper.rb', line 24

def 
  @current_user..utc.iso8601
end