summaryrefslogtreecommitdiff
path: root/users/app/helpers/users_helper.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-01-17 09:36:27 -0800
committerjessib <jessib@riseup.net>2013-01-17 09:36:27 -0800
commitb550cd14f33b9664fe6b547dc56107fae7d12caf (patch)
tree78034e20632f9e6361deb7e1000db0bcb079f03f /users/app/helpers/users_helper.rb
parentee2ea4ac8f4c6b0c3b09be6ed49e7a1faec7a9c1 (diff)
parent9d53f7b2d1b34da6b6103e97bd6c931cedb23e9b (diff)
Merge pull request #14 from leapcode/feature/show_user
Adding show view for users.
Diffstat (limited to 'users/app/helpers/users_helper.rb')
-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