Sha256: ac1b442b479d0dcc70b7f8f45f0cee78061429b2eaf5dfabb14f825156dc4da6
Contents?: true
Size: 821 Bytes
Versions: 10
Compression:
Stored size: 821 Bytes
Contents
# frozen_string_literal: true module Decidim module Core module HasLocalizedInputSort def self.included(child_class) child_class.argument :locale, type: String, description: "Specify the locale to use when ordering translated fields, otherwise default organization language will be used", required: false, prepare: ->(locale, ctx) do unless ctx[:current_organization].available_locales.include?(locale) raise GraphQL::ExecutionError, "#{locale} locale is not used in the organization" end locale end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems