Module: TopicPostBookmarkableHelper::ClassMethods
- Defined in:
- app/helpers/topic_post_bookmarkable_helper.rb
Instance Method Summary collapse
Instance Method Details
#sync_topic_user_bookmarked(user, topic, opts) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/helpers/topic_post_bookmarkable_helper.rb', line 7 def sync_topic_user_bookmarked(user, topic, opts) return if opts.key?(:auto_track) && !opts[:auto_track] TopicUser.change( user.id, topic.id, bookmarked: Bookmark.for_user_in_topic(user.id, topic).exists?, ) end |