class ActionController::Base
Public Instance Methods
preload_translations_for(*collections)
click to toggle source
Preload the translations string for all the collections. This allow to load all translation resources in only one SQL query. Take in consideration this will execute the request
# File lib/ext/controller_ext.rb, line 10 def preload_translations_for *collections RailsDbLocalize::TranslationCache.instance.prefetch_collections(*collections) end
Private Instance Methods
prepare_translation_cache() { || ... }
click to toggle source
# File lib/ext/controller_ext.rb, line 15 def prepare_translation_cache RailsDbLocalize::TranslationCache.reinit yield if block_given? end