Skip to content

Commit

Permalink
Fix issue on documentation
Browse files Browse the repository at this point in the history
Fix an issue with the documentation related to the custom configuration
of the stock location filter and sorter. The way it was documented
didn't work.
  • Loading branch information
gugaiz committed Feb 25, 2020
1 parent e759105 commit f64b507
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
7 changes: 3 additions & 4 deletions guides/source/developers/shipments/stock-allocator.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ For example, you can register it in your `/config/initializer/spree.rb` initiali
```ruby
# /config/initializer/spree.rb
Spree.config do |config|
# ...

config.stock.allocator_class = 'Spree::Stock::Allocator::CustomAllocator'
end
# ...
config.stock.allocator_class = 'Spree::Stock::Allocator::CustomAllocator'
# ...
end
```
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ the split shipments logic.
For example, you can register it in your `/config/initializers/spree.rb` initializer:

```ruby
# /config/initializers/spree.rb

Rails.application.config.spree.stock.location_filter_class = 'Spree::Stock::LocationFilter::SameOrderCountry'
# /config/initializer/spree.rb
Spree.config do |config|
# ...
config.stock.location_filter_class = 'Spree::Stock::LocationFilter::SameOrderCountry'
# ...
end
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ Once you have created the logic for the new sorter, you need to register it so t
For example, you can register it in your `/config/initializers/spree.rb` initializer:

```ruby
# /config/initializers/spree.rb

Rails.application.config.spree.stock.location_sorter_class = 'Spree::Stock::LocationSorter::Priority'
# /config/initializer/spree.rb
Spree.config do |config|
# ...
config.stock.location_sorter_class = 'Spree::Stock::LocationSorter::Priority'
# ...
end
```

0 comments on commit f64b507

Please sign in to comment.