Class: Blgr::ApplicationController
Instance Method Summary
collapse
#append_info_to_payload
Instance Method Details
#identity_cache_memoization(&block) ⇒ Object
17
18
19
|
# File 'app/controllers/blgr/application_controller.rb', line 17
def identity_cache_memoization(&block)
IdentityCache.cache.with_memoization(&block)
end
|
#set_select_data ⇒ Object
29
30
31
32
33
34
|
# File 'app/controllers/blgr/application_controller.rb', line 29
def set_select_data
I18n.locale = params.fetch(:locale, :th)
@select_restaurants = select_restaurants
@select_groups = select_groups
@select_branches = select_branches
end
|
#switch_locale(&action) ⇒ Object
23
24
25
26
27
|
# File 'app/controllers/blgr/application_controller.rb', line 23
def switch_locale(&action)
I18n.with_locale(:en) do
Globalize.with_locale(:en, &action)
end
end
|