Module: Kakimasu

Defined in:
lib/kakimasu.rb,
lib/kakimasu/engine.rb,
lib/kakimasu/version.rb,
lib/generators/kakimasu/views_generator.rb,
app/controllers/kakimasu/home_controller.rb,
app/controllers/kakimasu/keys_controller.rb,
lib/generators/kakimasu/backup_generator.rb,
lib/generators/kakimasu/policy_generator.rb,
app/controllers/kakimasu/translations_controller.rb,
lib/generators/kakimasu/restore_backup_generator.rb

Defined Under Namespace

Modules: Generators Classes: Engine, HomeController, KeysController, TranslationsController

Constant Summary collapse

VERSION =
'1.0.0'.freeze

Instance Method Summary collapse

Instance Method Details

#set_show_translation_keyObject

Turn of ‘translation mode’ mechanism



6
7
8
9
10
# File 'lib/kakimasu.rb', line 6

def set_show_translation_key
  Thread.current[:show_translation_key] = nil
  return unless current_user.try(:admin?)
  Thread.current[:show_translation_key] = (params[:show_translation_key] == 'true').presence
end