Best way to handle per user Settings in Rails 3
I'm developing an application in Rails 3. In the application, users are allowed to send e-mails using their existing email account settings. What's 开发者_StackOverflow中文版the best approach to define per user settings for every user's credentials?
Regards, Liviu
Given you'd probably want to offer the option for users to change/update their settings, they should go in a model. After that, it comes down to taste...
If you have only a few settings, you could store them directly in the User model. If you have lots of settings, you could have a separate UserProfile model that belongs_to
User.
精彩评论