Sha256: dc41c5a0954378d76a65888edeee6cc34259598a3d2d34aaaedaf7fe1483ac17

Contents?: true

Size: 374 Bytes

Versions: 4

Compression:

Stored size: 374 Bytes

Contents

module MiradorRails
  class LocalesController < ::ApplicationController

    def locale
      language = params.fetch(:locale) { I18n.default_locale.to_s }
      locale = MiradorRails::Locale.new(language)
      render json: locale.file_source
    rescue MiradorRails::Exceptions::LocaleNotFound
      raise ActionController::RoutingError.new('Not Found')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mirador_rails-0.7.0 app/controllers/mirador_rails/locales_controller.rb
mirador_rails-0.6.0 app/controllers/mirador_rails/locales_controller.rb
mirador_rails-0.5.0 app/controllers/mirador_rails/locales_controller.rb
mirador_rails-0.4.1 app/controllers/mirador_rails/locales_controller.rb