Module: Model::UserTag
- Extended by:
- ActiveSupport::Concern
- Included in:
- Wechat::UserTag
- Defined in:
- app/models/wechat/model/user_tag.rb
Instance Method Summary collapse
- #remove_from_wechat ⇒ Object
- #sync_create_later ⇒ Object
- #sync_to_wechat ⇒ Object
- #wechat_api ⇒ Object
Instance Method Details
#remove_from_wechat ⇒ Object
33 34 35 |
# File 'app/models/wechat/model/user_tag.rb', line 33 def remove_from_wechat wechat_api.tag_del_user(tag.tag_id, open_id) if wechat_api end |
#sync_create_later ⇒ Object
19 20 21 |
# File 'app/models/wechat/model/user_tag.rb', line 19 def sync_create_later UserTagJob.perform_later(self) end |
#sync_to_wechat ⇒ Object
23 24 25 26 27 |
# File 'app/models/wechat/model/user_tag.rb', line 23 def sync_to_wechat if wechat_api wechat_api.tag_add_user(tag.tag_id, wechat_user.uid) end end |
#wechat_api ⇒ Object
29 30 31 |
# File 'app/models/wechat/model/user_tag.rb', line 29 def wechat_api @wechat_api ||= app&.api end |