debian-mirror-gitlab/derailed-benchmarks/test/rails_app/app/controllers/application_controller.rb
2019-10-03 20:48:27 +05:30

17 lines
376 B
Ruby

# frozen_string_literal: true
class ApplicationController < ActionController::Base
if respond_to?(:before_filter) && !respond_to?(:before_action)
class << self
alias :before_action :before_filter
end
end
protect_from_forgery
before_action :pull_out_locale
def pull_out_locale
I18n.locale = params[:locale] if params[:locale].present?
end
end