Last active
August 29, 2015 14:27
-
-
Save Hates/e54ace5580519ce267dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
karma: | |
admin: "admin title" | |
level_-1: "title1" | |
level_0: "title2" | |
level_50: "title3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= t karma_title(@user) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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