Skip to content

Commit 57fa0ae

Browse files
committed
Fix wording for missing model
1 parent 5465aba commit 57fa0ae

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/jsonapi/resource.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ def _model_class
10051005

10061006
@model_class = model_name.to_s.safe_constantize
10071007
if @model_class.nil?
1008-
warn "[MODEL NOT FOUND] Model could not be found for #{self.name}. If this a base Resource declare it as abstract."
1008+
warn "[MODEL NOT FOUND] Model could not be found for #{self.name}. If this is a base Resource declare it as abstract."
10091009
end
10101010

10111011
@model_class

test/unit/resource/resource_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def test_nil_model_class
184184
# ToDo:Figure out why this test does not work on Rails 4.0
185185
# :nocov:
186186
if (Rails::VERSION::MAJOR >= 4 && Rails::VERSION::MINOR >= 1) || (Rails::VERSION::MAJOR >= 5)
187-
assert_output nil, "[MODEL NOT FOUND] Model could not be found for NoMatchResource. If this a base Resource declare it as abstract.\n" do
187+
assert_output nil, "[MODEL NOT FOUND] Model could not be found for NoMatchResource. If this is a base Resource declare it as abstract.\n" do
188188
assert_nil NoMatchResource._model_class
189189
end
190190
end
@@ -593,7 +593,7 @@ class NoModelResource < JSONAPI::Resource
593593
NoModelResource._model_class
594594
CODE
595595
end
596-
assert_match "[MODEL NOT FOUND] Model could not be found for ResourceTest::NoModelResource. If this a base Resource declare it as abstract.\n", err
596+
assert_match "[MODEL NOT FOUND] Model could not be found for ResourceTest::NoModelResource. If this is a base Resource declare it as abstract.\n", err
597597
end
598598

599599
def test_no_warning_when_abstract

0 commit comments

Comments
 (0)