Module: UsersHelper

Defined in:
app/helpers/users_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) possessive(name)

also used in contents view



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

def possessive( name )
  name + ('s' == name[-1,1] ? "'" : "'s" )
end

- (Object) user_title(user, model)



7
8
9
# File 'app/helpers/users_helper.rb', line 7

def user_title( user, model)
  [current_user == @user? t('users.show_body.my') : possessive(@user.first_name), model].join ' '
end