Skip to content

Fix #352 and #353 #354

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

Merged
merged 3 commits into from
Jun 24, 2019

Conversation

Gasparila
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue Fix #352 #353
Need Doc update no

Fix breaking change introduced in #352
According to the documentation,
using custom attributes without a custom _changed? method will always
cause changes to push to the API. This behavior was lost in #338

Fix unexpected behavior during transactions #353
@algolia_must_reindex is reset in every validate call. This means that a record
that is updated multiple times in a transaction will only be indexed if the
final update marks as must reindex. Update the code so that once
@algolia_must_reindex is marked as true, it remains true until
explicitly unset in algolia_perform_index_tasks

Gasparila added 3 commits May 11, 2019 11:18
Fix breaking change introduced in algolia#352
According to the [documentation](https://github.com/algolia/algoliasearch-rails/blob/master/lib/README.md#630),
using custom attributes without a custom `_changed?` method will always
cause changes to push to the API. This behavior was lost in algolia#338

Fix unexpected behavior during transactions algolia#353
`@algolia_must_reindex` is reset in every validate call. This means that a record
that is updated multiple times in a transaction will only be indexed if the
final update marks as must reindex. Update the code so that once
`@algolia_must_reindex` is marked as `true`, it remains true until
explicitly unset in `algolia_perform_index_tasks`
@Gasparila Gasparila force-pushed the kevin/fix_transaction_issues branch from 5987061 to c1e28a2 Compare May 11, 2019 23:48
@Gasparila Gasparila mentioned this pull request May 13, 2019
# Nil means we don't know if the attribute has changed
nil
# We don't know if the attribute has changed, so conservatively assume it has
true
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@julienbourdeau julienbourdeau merged commit 3ba8f51 into algolia:master Jun 24, 2019
@julienbourdeau
Copy link
Contributor

Hi @Gasparila ,

Thank you very much for this PR, this is very valuable 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.22 breaking change
2 participants