How does ordering a hstore attribute works in Rails 6?

Viewed 119

In my database there is a "News" model with a hstore attribute "title", which provides a title in multiple languages like this:

{
  "de": "Beispiel Titel",
  "en": "example title"
}

When I build a Query like News.all.order({ "title" => "desc"}) it works. Can Someone explain how it works under the hood?

0 Answers
Related