Skip to content

Instantly share code, notes, and snippets.

@richardhartme
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save richardhartme/e54ace5580519ce267dc to your computer and use it in GitHub Desktop.

Select an option

Save richardhartme/e54ace5580519ce267dc to your computer and use it in GitHub Desktop.
en:
karma:
admin: "admin title"
level_-1: "title1"
level_0: "title2"
level_50: "title3"
<%= t karma_title(@user) %>
module UserHelper
def karma_title(user)
return "karma.admin" if user.admin?
"karma.level_#{user.karma}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment