Module: Model::UserTagged
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/wechat/model/user_tagged.rb
Instance Method Summary collapse
Instance Method Details
#sync_to_wechat_user_tag ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/models/wechat/model/user_tagged.rb', line 11 def sync_to_wechat_user_tag user.oauth_users.where(type: 'WechatUser').each do |wechat_user| tag = .find_by(app_id: wechat_user.app&.id) next unless tag wut = wechat_user..build(tag_id: tag.id) wut.save end end |