meilisearch-rails 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e61a10b5b9eaf11606209ff295728cdd962acdb4f21d02004d416ed7346a3212
4
- data.tar.gz: bd8b788affabaa81eafbcd027e223179c356e3d21af2083f335d2def1def71af
3
+ metadata.gz: ea22a400fc0f909f793e231f12a61b47f1d751d0c5932f71f2503001bf57c39e
4
+ data.tar.gz: b05b67044feec7c8199252026794cd33247045adb62bde0f368a82f2597dd27f
5
5
  SHA512:
6
- metadata.gz: 5e3af82f062f7578f8008c15050c67c1241b9922613e65dfeb8fb9c7ef6816e2900eb76b0836e726e3af0c408401761f6e9582ccd3ebd10173db49fc978b7015
7
- data.tar.gz: '02424401493f9e983fa5b0b556e388191ef9612c7ab799cc781ed05bf8a42cb8a54cf98d3062bcd0c7525e81e0a986326fd37b89c853d83981bbf1332e0c9329'
6
+ metadata.gz: e1d8b8475cf7f5777ed9c897b342bb4283ad3b00ab12b12060e664acecb973fcb87566aaf5b6fb4a98324bfadeec389bc765cb83563b37d9bce8da088a573e53
7
+ data.tar.gz: ba4c38cc90384fbcb0623891e57629b7ba3472d7695f108d6623846a534af81c669b1f8b63af7003998c50449c20385b4f0f7a85d9f6eb5ef25daaf13948e3f0
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MeiliSearch
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
@@ -317,7 +317,7 @@ module MeiliSearch
317
317
  def meilisearch(options = {}, &block)
318
318
  self.meilisearch_settings = IndexSettings.new(options, &block)
319
319
  self.meilisearch_options = {
320
- type: ms_full_const_get(model_name.to_s),
320
+ type: model_name.to_s.constantize,
321
321
  per_page: meilisearch_settings.get_setting(:hitsPerPage) || 20, page: 1
322
322
  }.merge(options)
323
323
 
@@ -775,18 +775,6 @@ module MeiliSearch
775
775
  false
776
776
  end
777
777
 
778
- def ms_full_const_get(name)
779
- list = name.split('::')
780
- list.shift if list.first.blank?
781
- obj = self
782
- list.each do |x|
783
- # This is required because const_get tries to look for constants in the
784
- # ancestor chain, but we only want constants that are HERE
785
- obj = obj.const_defined?(x) ? obj.const_get(x) : obj.const_missing(x)
786
- end
787
- obj
788
- end
789
-
790
778
  def ms_conditional_index?(options = nil)
791
779
  options ||= meilisearch_options
792
780
  options[:if].present? || options[:unless].present?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meilisearch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-13 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json