Sha256: ad6749ed51d28dffff5ecbc7ff441ad980aa5b446e72cd9adbfd694bceded174
Contents?: true
Size: 563 Bytes
Versions: 3
Compression:
Stored size: 563 Bytes
Contents
module MeiliSearch module Configuration def configuration @@configuration || raise(NotConfigured, "Please configure MeiliSearch. Set MeiliSearch.configuration = {meilisearch_host: 'YOUR_MEILISEARCH_HOST', meilisearch_api_key: 'YOUR_API_KEY'}") end def configuration=(configuration) @@configuration = configuration end def client ::MeiliSearch::Client.new( configuration[:meilisearch_host], configuration[:meilisearch_api_key], configuration.slice(:timeout, :max_retries) ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
meilisearch-rails-0.2.3 | lib/meilisearch/configuration.rb |
meilisearch-rails-0.2.2 | lib/meilisearch/configuration.rb |
meilisearch-rails-0.2.1 | lib/meilisearch/configuration.rb |