Skip to content

Instantly share code, notes, and snippets.

@jhjguxin
Created June 21, 2012 04:45
Show Gist options
  • Save jhjguxin/2963879 to your computer and use it in GitHub Desktop.
Save jhjguxin/2963879 to your computer and use it in GitHub Desktop.
mongoid namespace model i18n
class Recommend::RecommendProduct
include Mongoid::Document
field :position, type: String
field :name, type: String
field :image, type: String
field :title, type: String
field :price, type: Float
field :cnt_buy, type: Integer
field :cnt_comment, type: Integer
field :link_url, type: String
field :created_at, type: DateTime
field :updated_at, type: DateTime
end
zh-CN:
mongoid:
models:
recommend/recommend_product: "产品推送"
attributes:
recommend/recommend_product:
id: "id"
position: "栏位"
name: "名称"
image: "图片"
title: "标题"
price: "价格"
cnt_buy: "购买数"
cnt_comment: "回复数"
link_url: "链接"
created_at: "创建时间"
updated_at: "更新时间"
##model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment