mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-31 11:12:12 +02:00
Appease the mighty dog overlords (fix Ruby code nits)
This commit is contained in:
parent
aec10cbb9a
commit
fb812d4f36
1 changed files with 17 additions and 17 deletions
|
@ -11,25 +11,25 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
# check if user wants to read
|
# check if user wants to read
|
||||||
def check_locale
|
def check_locale
|
||||||
return I18n.locale = 'en' if Rails.env.test?
|
return I18n.locale = "en" if Rails.env.test?
|
||||||
|
|
||||||
I18n.locale = 'en'
|
I18n.locale = "en"
|
||||||
|
|
||||||
# if params[:hl].nil?
|
# if params[:hl].nil?
|
||||||
# if current_user.present?
|
# if current_user.present?
|
||||||
# I18n.locale = current_user.locale
|
# I18n.locale = current_user.locale
|
||||||
# elsif not cookies[:lang].nil?
|
# elsif not cookies[:lang].nil?
|
||||||
# I18n.locale = cookies[:lang]
|
# I18n.locale = cookies[:lang]
|
||||||
# else
|
# else
|
||||||
# I18n.locale = 'en'
|
# I18n.locale = 'en'
|
||||||
# end
|
# end
|
||||||
# else
|
# else
|
||||||
# I18n.locale = params[:hl]
|
# I18n.locale = params[:hl]
|
||||||
# if current_user.present?
|
# if current_user.present?
|
||||||
# current_user.locale = I18n.locale
|
# current_user.locale = I18n.locale
|
||||||
# current_user.save!
|
# current_user.save!
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
|
||||||
cookies[:lang] = I18n.locale
|
cookies[:lang] = I18n.locale
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue