Skip to content

1.22 breaking change #352

@Gasparila

Description

@Gasparila
  • Rails version: 5.1.6
  • Algolia Rails integration version: 1.22

Description

#338 introduced a few
breaking changes (including 1 fixed in #350).

https://github.com/algolia/algoliasearch-rails/pull/338/files#diff-dfaec67e907148ea8211e17340f0f30cR749 changed the behavior
for when <attribute>_changed? doesn't exist. Previously it would
be conservative and always auto-index if there are custom attributes.
Now it will assume no changes are necessary

Steps To Reproduce

class AnyModel < ActiveRecord::Base
  include AlgoliaSearch
  algoliasearch do
    attribute(:not_a_column) { some_column + 1 }
  end
end

instance_of_model.update!(some_column: 3) # will not trigger algolia update

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions