GithubHelp home page GithubHelp logo

Comments (8)

ellnix avatar ellnix commented on June 2, 2024 1

Reopening this until it's confirmed that #330 fixes it.

from meilisearch-rails.

ellnix avatar ellnix commented on June 2, 2024

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.

jeremylynch avatar jeremylynch commented on June 2, 2024

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.

jeremylynch avatar jeremylynch commented on June 2, 2024

Confirming downgrading to version 0.10.2 fixes the issue

from meilisearch-rails.

ellnix avatar ellnix commented on June 2, 2024

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.

ellnix avatar ellnix commented on June 2, 2024

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.

curquiza avatar curquiza commented on June 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.