2016-12-26 11:03:30 +08:00
|
|
|
module UsersHelper
|
2016-12-27 22:21:50 +08:00
|
|
|
def get_user_name_from_id user_id
|
2017-01-06 21:09:03 +08:00
|
|
|
user = User.find_by(id: user_id)
|
|
|
|
return user.name if !user.nil?
|
2016-12-27 22:21:50 +08:00
|
|
|
end
|
2017-01-14 15:43:34 +08:00
|
|
|
|
|
|
|
def get_user_sexual user
|
|
|
|
user.sexual
|
|
|
|
end
|
2016-12-26 11:03:30 +08:00
|
|
|
end
|
2017-01-14 15:43:34 +08:00
|
|
|
|