I have `Postactivity` model, which has `post_id` as the foreign key of the Post Model (has\_one relation) and this `Postactivity` model has the likes array. 

How i can sort `Post` model by `likes`?

```
class Post
  has_one :postactivity, foreign_key: :post_activity_id, class_name:"PostActivity"
end

class PostActivity
  field :likes, type: Array  
  belongs_to :post, foreign_key: :post_id, class_name: "Post"
end

```