No, it's a very bad way. You should do all your filtering and ordering in the database. Try:

```ruby
tags = current_user.follows.where(followable_type: "ActsAsTaggableOn::Tag").pluck(:id)
users = current_user.follows.where(followable_type: "User").pluck(:id)

@videos = Video.published
@videos = @videos.select("DISTINCT(videos.id), videos.*")
@videos = @videos.joins(:taggings)
@videos = @videos.where("taggings.tag_id in (?) or videos.user_id in (?)", tags, users)
@videos = @videos.order('updated_at desc')
@videos = @videos.page(params[:page]).per(12)
```

It's still three queries, so not perfect, but it should work for now.

Also, "following" as an order makes no sense. Just remove all of that until we actually have different ways we want to order the stream. 

Your case statement indentation is incorrect too.