Rails How to easy show hide user fields?
I want easy implement a show hide funktion on sertant fields. Like birthday or email for a user. Example if the user has chosen to hide his email it wont display in his profile.
How do i create this?
开发者_JAVA百科Best regards,
A Rails (3) beginner
One option would be creating a model to store user preferences in to keep track of what the user wants to show/hide. Another option is to use one of the gems out there that will help you accomplish this task. Just looking on github, I came across https://github.com/pluginaweek/preferences.
精彩评论