Comments (8)
Reopening this until it's confirmed that #330 fixes it.
from meilisearch-rails.
Can I see the test where this is occurring?
Any set up such as the creation of the database table and model class would also be appreciated.
from meilisearch-rails.
Occurring in tests like this:
test 'page_url' do
@page = create(:page) # factorybot
assert @page.page_url == "https://www.testing.com"
end
from meilisearch-rails.
Confirming downgrading to version 0.10.2 fixes the issue
from meilisearch-rails.
I created a new rails app, with a Page
model that has a `page_url' attribute:
ActiveRecord::Schema[7.1].define(version: 2024_02_17_123956) do
create_table "pages", force: :cascade do |t|
t.string "page_url"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
class Page < ApplicationRecord
include MeiliSearch::Rails
meilisearch
end
Migrated, defined this factory in test/test_helper.rb
:
FactoryBot.define do
factory :page do
page_url { 'https://www.testing.com' }
end
end
And then added the test you provided:
require "test_helper"
class PageTest < ActiveSupport::TestCase
test 'page_url' do
@page = FactoryBot.create(:page) # factorybot
assert @page.page_url == "https://www.testing.com"
end
end
And I get no error:
ยป bin/rails test
Running 1 tests in a single process (parallelization threshold is 50)
Run options: --seed 39564
# Running:
.
Finished in 0.051185s, 19.5371 runs/s, 19.5371 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
Relevant lines in the Gemfile
& Gemfile.lock
:
gem "factory_bot", "~> 6.4"
gem "meilisearch-rails", "~> 0.11.0"
meilisearch (0.26.0)
httparty (>= 0.17.1, < 0.22.0)
meilisearch-rails (0.11.0)
meilisearch (~> 0.26.0)
from meilisearch-rails.
I am still not sure exactly where this is being caused, but it is possible that #330 fixes it. Please try it and let me know whenever you can.
from meilisearch-rails.
@ellnix we need to do a release for this, feel free to start the process on the CONTRIBUTING when you think we are ready for a release. I'm available for any review you need
from meilisearch-rails.
Related Issues (20)
- Meilisearch Ruby now expects snake_cased attributes instead of camelCase. HOT 7
- Setting embedders directly inside model index configuration
- Facet search options cannot be passed using SafeIndex HOT 1
- filterableAttributes not set HOT 3
- Index already exists error HOT 8
- Issue with indexing when sanitizing attributes HOT 1
- Semantic Search using Embeddings HOT 2
- _geoBoundingBox filter causing an error HOT 2
- Upgrading to 0.11.0 produces "The request was not processed in the expected time." repeatedly. HOT 1
- Split and decouple models in integration_spec.rb to their separate files
- Improve test robustness and confidence with end-to-end system tests
- Improve spec style clarity
- Add unit tests for individual methods
- Support and test Sequel properly
- Document multi_search interface in README HOT 1
- single index sharing didnt create new index. HOT 3
- Using attribute option with custom primary key will break fetching
- Polymorphic shared indexes HOT 3
- Index-first search HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meilisearch-rails.