Sha256: 910c1d0e78101834f273d1f9c7a4afc9cbc2e0e40e652f9a55a1c25e6015e00a

Contents?: true

Size: 388 Bytes

Versions: 18

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true

module Maglev
  # Fetch the site and set up the Translatable available locales
  class FetchSite
    include Injectable

    def call
      Maglev::Site.first.tap do |site|
        change_default_locales(site)
      end
    end

    private

    def change_default_locales(site)
      Maglev::I18n.available_locales = site.locale_prefixes
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
maglevcms-1.5.1 app/services/maglev/fetch_site.rb
maglevcms-1.4.0 app/services/maglev/fetch_site.rb
maglevcms-1.3.0 app/services/maglev/fetch_site.rb
maglevcms-1.2.2 app/services/maglev/fetch_site.rb
maglevcms-1.2.1 app/services/maglev/fetch_site.rb
maglevcms-1.2.0 app/services/maglev/fetch_site.rb
maglevcms-1.1.7 app/services/maglev/fetch_site.rb
maglevcms-1.1.6 app/services/maglev/fetch_site.rb
maglevcms-1.1.5 app/services/maglev/fetch_site.rb
maglevcms-1.1.4 app/services/maglev/fetch_site.rb
maglevcms-1.1.3 app/services/maglev/fetch_site.rb
maglevcms-1.1.2 app/services/maglev/fetch_site.rb
maglevcms-1.1.1 app/services/maglev/fetch_site.rb
maglevcms-1.1.0 app/services/maglev/fetch_site.rb
maglevcms-1.0.0 app/services/maglev/fetch_site.rb
maglevcms-1.0.0.rc3 app/services/maglev/fetch_site.rb
maglevcms-1.0.0.rc2 app/services/maglev/fetch_site.rb
maglevcms-1.0.0.rc1 app/services/maglev/fetch_site.rb