Run rubocop --fix-layout and remove encoding comments
This commit is contained in:
parent
fa63e6e81d
commit
ea2862fdef
283 changed files with 1164 additions and 1969 deletions
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
class ApplicationController < ActionController::Base
|
||||
include Concerns::FoodcoopScope
|
||||
include Concerns::Auth
|
||||
|
|
@ -8,11 +7,10 @@ class ApplicationController < ActionController::Base
|
|||
helper_method :available_locales
|
||||
|
||||
protect_from_forgery
|
||||
before_action :authenticate, :set_user_last_activity, :store_controller, :items_per_page
|
||||
before_action :authenticate, :set_user_last_activity, :store_controller, :items_per_page
|
||||
after_action :remove_controller
|
||||
around_action :set_time_zone, :set_currency
|
||||
|
||||
|
||||
# Returns the controller handling the current request.
|
||||
def self.current
|
||||
Thread.current[:application_controller]
|
||||
|
|
@ -90,10 +88,9 @@ class ApplicationController < ActionController::Base
|
|||
old_currency = ::I18n.t('number.currency.format.unit')
|
||||
new_currency = FoodsoftConfig[:currency_unit] || ''
|
||||
new_currency += "\u202f" if FoodsoftConfig[:currency_space]
|
||||
::I18n.backend.store_translations(::I18n.locale, number: {currency: {format: {unit: new_currency}}})
|
||||
::I18n.backend.store_translations(::I18n.locale, number: { currency: { format: { unit: new_currency } } })
|
||||
yield
|
||||
ensure
|
||||
::I18n.backend.store_translations(::I18n.locale, number: {currency: {format: {unit: old_currency}}})
|
||||
::I18n.backend.store_translations(::I18n.locale, number: { currency: { format: { unit: old_currency } } })
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue