lib/cardio/utils.rb in card-1.101.3 vs lib/cardio/utils.rb in card-1.101.4

- old
+ new

@@ -1,15 +1,17 @@ module Cardio # Utilities that may need to be run even when mods are not loaded. module Utils - def tr key, args={} - kaller = args.delete(:caller) || caller - args[:scope] ||= Card::Set.scope kaller + def t key, args={} ::I18n.t key, args end def seed_test_db system "env RAILS_ENV=test bundle exec rake db:fixtures:load" + end + + def database_name + @database_name ||= config.database_configuration.dig Rails.env, "database" end # deletes tmp directory within files directory # It's here because it gets called as part of cache clearing, which sometimes gets # called in a context where card mods are not loaded.