Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def with_highrated_related_content
- name = __method__.to_s.humanize
- collection = Content::TYPES.inject([]) do |recommendation_collection, content_type|
- items = @recommendations_aggregator.with_highrated_related_content(content_type)
- recommendation_collection << decorate_content_related_hash(content_type, items)
- end
- decorate_content_related_collection(name, collection)
- end
- def with_liked_related_content(user)
- name = __method__.to_s.humanize
- collection = Content::TYPES.inject([]) do |recommendation_collection, content_type|
- items = @recommendations_aggregator.with_liked_related_content(user, content_type)
- recommendation_collection << decorate_content_related_hash(content_type, items)
- end
- decorate_content_related_collection(name, collection)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement