wechat model完善

This commit is contained in:
guange 2016-01-19 12:00:13 +08:00
parent 08e193ea3c
commit 571196ad2d
2 changed files with 5 additions and 1 deletions

View File

@ -179,6 +179,7 @@ class User < Principal
#####
has_many :shares ,:dependent => :destroy
has_one :user_wechat
# add by zjc
has_one :level, :class_name => 'UserLevels', :dependent => :destroy

View File

@ -1,3 +1,6 @@
class UserWechat < ActiveRecord::Base
# attr_accessible :title, :body
attr_accessible :subscribe, :openid, :nickname, :sex, :language, :city, :province, :country,
:headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user
belongs_to :user
end