Sha256: d2b251f8ff3c39a0b02e68199e77e3a4da3cc8b2e59c63cc7977ddd59b4afc39
Contents?: true
Size: 824 Bytes
Versions: 10
Compression:
Stored size: 824 Bytes
Contents
# frozen_string_literal: true module Decidim module Core module HasLocalizedInputFilter def self.included(child_class) child_class.argument :locale, type: String, description: "Specify the locale to use when searching 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