Sha256: e2d5fda9dba120971d7480a3af89b583e7c5e5ec0e0061d74bca37b388172441

Contents?: true

Size: 354 Bytes

Versions: 1

Compression:

Stored size: 354 Bytes

Contents

module Sprangular
  ##
  # API Endpoint to set locale for session
  class LocaleController < Sprangular::BaseController
    def show
      session[:locale] = params[:locale]

      respond_to do |format|
        format.js { render js: "window.location.reload" }
        format.html { redirect_to sprangular_engine.root_path }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sprangular-0.1.0 app/controllers/sprangular/locale_controller.rb