Module: UsersHelper

Defined in:
app/helpers/users_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) user_last_seen_tag(user)



15
16
17
18
19
20
21
# File 'app/helpers/users_helper.rb', line 15

def user_last_seen_tag(user)
  if !user..blank?
    time_ago_in_words(user.) + '  ago'
  else
    (:em, 'never') 
  end
end


7
8
9
10
11
12
13
# File 'app/helpers/users_helper.rb', line 7

def user_link(user)
  if @sessions_current_user == user || @sessions_current_user.is_administrator?
    link_to(user_tag(user), user)
  else
     :span, user_tag(user), class: :subtle
  end
end

- (Object) user_tag(user)



3
4
5
# File 'app/helpers/users_helper.rb', line 3

def user_tag(user)
  user.name
end