Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Relationship.includes(:follower, followed: :funz).active.each do |relationship|
- relationship.followed.funz.each do |funz|
- follower = relationship.follower
- if funz.active? && funz.visible && !funz.b2b && follower.orders.confirmed.by_funz(funz.id).empty?
- bookmark = follower.bookmarks.find_or_initialize_by(funz_id: funz.id)
- if !bookmark.active
- bookmark.update_attributes(bookmark_source: 'follow-host', active: true)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement