-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Chewy::Type, simplify DSL: (#783)
- Remove the `Chewy::Type` class - e.g. remove `CitiesIndex::City` / `CitiesIndex.city` - `CitiesIndex::City.import! ...` becomes `CitiesIndex.import! ...` - Simplify index DSL: - `define_type` block -> `index_scope` clause - it can be omitted completely, if you don't need to specify the scope or options, e.g. `name` - Remove type names from string representations: - in `update_index` ActiveRecord helper and RSpec matcher, e.g. - `update_index('cities#city')` -> `update_index('cities')` - `update_index(UsersIndex::User)` -> `update_index(UsersIndex)` - in rake tasks (e.g. `rake chewy:update[cities#city]` -> `rake chewy:update[cities]`) - in rake tasks output (e.g. `Imported CitiesIndex::City in 1s, stats: index 3` -> `Imported CitiesIndex in 1s, stats: index 3`) - Use index name instead of type name in loader additional scope - e.g. `CitiesIndex.filter(...).load(city: {scope: City.where(...)})` -> `CitiesIndex.filter(...).load(cities: {scope: City.where(...)})`
- Loading branch information
Ivan Rabotyaga
authored
Apr 19, 2021
1 parent
6a9cf13
commit a349bf6
Showing
77 changed files
with
1,496 additions
and
2,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.