# frozen_string_literal: true # == Schema Information # # Table name: popular_languages # # id :integer not null, primary key # title_translations :hstore # country_code :string(2) # sort_order :integer default(1) # created_at :datetime not null # updated_at :datetime not null # class PopularLanguage < ActiveRecord::Base scope :sorted, -> { order("#{quoted_table_name}.sort_order") } default_scope -> { sorted } translates :title end