From 726b10240c49ca2a26e2867e0d0179dd9f5deb3d Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Sun, 5 Feb 2017 20:09:26 -0600 Subject: [PATCH] Fix typos ``` go get -u github.com/client9/misspell/cmd/misspell misspell -w -error -source=text . ``` --- lib/jsonapi/resource.rb | 2 +- test/controllers/controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jsonapi/resource.rb b/lib/jsonapi/resource.rb index f2a81a6d4..edb871d1e 100644 --- a/lib/jsonapi/resource.rb +++ b/lib/jsonapi/resource.rb @@ -656,7 +656,7 @@ def apply_sort(records, order_options, _context = {}) associations = _lookup_association_chain([records.model.to_s, *model_names]) joins_query = _build_joins([records.model, *associations]) - # _sorting is appended to avoid name clashes with manual joins eg. overriden filters + # _sorting is appended to avoid name clashes with manual joins eg. overridden filters order_by_query = "#{associations.last.name}_sorting.#{column_name} #{direction}" records = records.joins(joins_query).order(order_by_query) else diff --git a/test/controllers/controller_test.rb b/test/controllers/controller_test.rb index 82abc5863..c1b350329 100644 --- a/test/controllers/controller_test.rb +++ b/test/controllers/controller_test.rb @@ -2488,7 +2488,7 @@ def test_destroy_relationship_has_and_belongs_to_many JSONAPI.configuration.use_relationship_reflection = false end - def test_destroy_relationship_has_and_belongs_to_many_refect + def test_destroy_relationship_has_and_belongs_to_many_reflect JSONAPI.configuration.use_relationship_reflection = true assert_equal 2, Book.find(2).authors.count