summaryrefslogtreecommitdiff
path: root/users/app/helpers
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-01-08 13:20:34 -0800
committerjessib <jessib@leap.se>2013-01-08 13:20:34 -0800
commit2599c7bac06ee55d58e492a47e09ee163e9582ba (patch)
treeafeb490e23d886c617d339f70d4397e7ad806e89 /users/app/helpers
parentcee6db281349789ba5ff6dc8d3dc6ca10400aebe (diff)
Adding show view for users.
Diffstat (limited to 'users/app/helpers')
-rw-r--r--users/app/helpers/users_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/users/app/helpers/users_helper.rb b/users/app/helpers/users_helper.rb
index 45ca0e9..5f68085 100644
--- a/users/app/helpers/users_helper.rb
+++ b/users/app/helpers/users_helper.rb
@@ -30,4 +30,10 @@ module UsersHelper
classes.compact
end
+ def user_field(field)
+ value = @user.send(field)
+ value = value.to_s(:long) if field.end_with? '_at'
+ value || 'not set'
+ end
+
end