Sha256: 019e192ba29ba68d583346b001ce9753e4c1f0b3ea50ae6de7686e70cf702dbe

Contents?: true

Size: 436 Bytes

Versions: 3

Compression:

Stored size: 436 Bytes

Contents

module Spina
  module UserInterface
    class TranslationsComponent < ApplicationComponent
  
      def initialize(record, label: nil)
        @record = record
        @label = label
      end
      
      def render?
        spina_locales.many?
      end
      
      def locales
        spina_locales
      end
  
      private
  
        def spina_locales
          Spina.config.locales.map(&:to_sym)
        end
  
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spina-2.10.0 app/components/spina/user_interface/translations_component.rb
spina-2.9.1 app/components/spina/user_interface/translations_component.rb
spina-2.9.0 app/components/spina/user_interface/translations_component.rb