Sha256: bc0ec905b93d98720e9f15505788732a8f4d38d03726d45082128a982d529ffb

Contents?: true

Size: 612 Bytes

Versions: 12

Compression:

Stored size: 612 Bytes

Contents

# encoding: utf-8
class LocalizationController < ApplicationController
  before_action :init_locale

  def init_locale
    if params[:lang]
      session[:lang] = params[:lang]
    end

    session[:lang] = :nl unless session[:lang]

    I18n.locale = session[:lang]
  end

  def index
    @tasks_grid = initialize_grid(Task,
      include: [:priority, :status, :project, :assigned_users],
      order: 'statuses.name',
      custom_order: {
        'tasks.priority_id' => 'priorities.name',
        'tasks.status_id' => 'statuses.position',
        'tasks.project_id' => 'projects.name'
      }
    )
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
wice_grid-6.1.3 spec/support/test_app/app/controllers/localization_controller.rb
wice_grid-6.1.2 spec/support/test_app/app/controllers/localization_controller.rb
wice_grid-6.1.1 spec/support/test_app/app/controllers/localization_controller.rb
wice_grid-6.1.0 spec/support/test_app/app/controllers/localization_controller.rb
pwice_grid-7.0.0 spec/support/test_app/app/controllers/localization_controller.rb
pwice_grid-6.1.2 spec/support/test_app/app/controllers/localization_controller.rb
pwice_grid-6.1.1 spec/support/test_app/app/controllers/localization_controller.rb
pwice_grid-6.1.0 spec/support/test_app/app/controllers/localization_controller.rb
pwice_grid-5.0.2 spec/support/test_app/app/controllers/localization_controller.rb
pwice_grid-5.0.1 spec/support/test_app/app/controllers/localization_controller.rb
pwice_grid-5.0.0 spec/support/test_app/app/controllers/localization_controller.rb
wice_grid-4.1.0 spec/support/test_app/app/controllers/localization_controller.rb