Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn when you make missing attribute searchable #293

Merged

Conversation

ellnix
Copy link
Collaborator

@ellnix ellnix commented Sep 27, 2023

Pull Request

Related issue

Fixes #168

What does this PR do?

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @ellnix, for all of your work here!

I made some comments I would like you to reevaluate before we can merge this.

lib/meilisearch-rails.rb Show resolved Hide resolved
lib/meilisearch-rails.rb Outdated Show resolved Hide resolved
spec/integration_spec.rb Show resolved Hide resolved
spec/integration_spec.rb Outdated Show resolved Hide resolved
spec/integration_spec.rb Outdated Show resolved Hide resolved
lib/meilisearch-rails.rb Show resolved Hide resolved
@ellnix
Copy link
Collaborator Author

ellnix commented Oct 6, 2023

I believe I fixed the issues suggested, I had made some really strange decisions on this PR.

I also removed one place where I used the new ruby 3 method definition syntax which would have broken compatibility with ruby 2.x in the test suite.

@ellnix ellnix requested a review from brunoocasali October 6, 2023 13:51
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ef5d96c) 88.58% compared to head (007d085) 88.73%.

❗ Current head 007d085 differs from pull request most recent head 645cf76. Consider uploading reports for the commit 645cf76 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #293      +/-   ##
==========================================
+ Coverage   88.58%   88.73%   +0.15%     
==========================================
  Files          10       10              
  Lines         648      657       +9     
==========================================
+ Hits          574      583       +9     
  Misses         74       74              
Files Coverage Δ
lib/meilisearch-rails.rb 90.53% <100.00%> (+0.17%) ⬆️
lib/meilisearch/rails/pagination.rb 93.75% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brunoocasali
Copy link
Member

I believe I fixed the issues suggested, I had made some really strange decisions on this PR.

I also removed one place where I used the new ruby 3 method definition syntax which would have broken compatibility with ruby 2.x in the test suite.

Nice, as soon you fix them we will be good to go, thanks a lot for your effort @ellnix!

@ellnix ellnix force-pushed the warn-about-searchable-missing-attribute branch from f751075 to ec38983 Compare November 1, 2023 17:07
@ellnix
Copy link
Collaborator Author

ellnix commented Nov 1, 2023

@brunoocasali this should be good to go.

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellnix thanks for this fix 🎉

Thanks a lot for your patience and your smart work here ❤️

@brunoocasali brunoocasali added the enhancement New feature or request label Nov 3, 2023
@ellnix ellnix force-pushed the warn-about-searchable-missing-attribute branch from ec38983 to 645cf76 Compare November 3, 2023 18:17
@ellnix
Copy link
Collaborator Author

ellnix commented Nov 3, 2023

bors merge

@meili-bors meili-bors bot merged commit fc40e59 into meilisearch:main Nov 3, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error or warning when trying to use undefined attributes
2 participants