开发者

How best to define a record as free or premium?

I'm creating an app where a user can own many venues and each can have a free or premium listing. Whats the best way to define开发者_开发问答 a venue as free or premium?

Currently I have a string field which stores 'free' or 'premium' (with free being the default) for each venue record, selected from a dropdown menu in the edit page. The dropdown gets the free and premium inputs from roles set up in the model (I'm using the cancan gem to assign different attributes).

Is this a robust enough way to define free and premium?

Thanks for any input its much appreciated!


Consider to use boolean datatype for this purpose

name column :premium & set default value equal to false

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜