开发者

rails3 - Model Naming Suggestion

I'm getting ready to add notification settings to my app. Allowing a user to select true/false, for which type of activities they want notifications for.

My idea for a model is: UserSettingsNotifications. I picked UserSettings, as it's tied to the User, and the user will have several setting types including notifications and others.

Something like:

rails generate model UserSettingNotifications CommentReply:boolean .....

What do you think? Good to go, or not- rails fri开发者_如何学Cendly?


You phrased it "notification settings". I suggest dropping the user prefix and naming it NotificationSettings since it's likely clear in the model it belongs_to :user

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜