Sha256: 0f022bcd5636804eb3cd3fc65b1454829dcb4e0d6c73b8b4b08f8691dfbc1541

Contents?: true

Size: 856 Bytes

Versions: 1

Compression:

Stored size: 856 Bytes

Contents

# initialization of redis store
TRANSLATION_STORE = Redis.new
begin
   TRANSLATION_STORE.ping
rescue Redis::CannotConnectError => e
   puts "Error: Redis is not turned ON ! Please do so with 'redis-server' " 
   exit 1
end
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::KeyValue.new(TRANSLATION_STORE), I18n.backend)
RedisDictionary::Engine.redis = TRANSLATION_STORE

# You can set your available locales
# I18n.available_locales = [:en, :cs]

# default locale
I18n.default_locale = :en

# you can customize your menu here, you are given examples (name => regexp for search)
RedisDictionary.configure do |config|
  config.menu_items = {
    'All' => '*',
    'Activerecord' => 'activerecord',
    'Date / Time' => 'date|time',
    'Error' => 'error',
    'Number' => 'unmber.',
    'Pagination' => 'paginate',
    'Codebooks' => 'codebook',
  }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redis_dictionary-1.0.2 lib/generators/redis_dictionary/install/templates/redis_dictionary.rb.erb