Skip to content

Commit a7f7ea8

Browse files
jbamptondhh
andauthored
chore: fix grammar and spelling (#503)
Co-authored-by: David Heinemeier Hansson <[email protected]>
1 parent e677dd8 commit a7f7ea8

5 files changed

+7
-7
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ company.to_builder.target!
163163
```
164164
165165
You can either use Jbuilder stand-alone or directly as an ActionView template
166-
language. When required in Rails, you can create views a la show.json.jbuilder
166+
language. When required in Rails, you can create views à la show.json.jbuilder
167167
(the json is already yielded):
168168
169169
``` ruby
@@ -207,7 +207,7 @@ json.comments @post.comments, partial: 'comments/comment', as: :comment
207207
```
208208
209209
The `as: :some_symbol` is used with partials. It will take care of mapping the passed in object to a variable for the
210-
partial. If the value is a collection (either implicitly or explicitly by using the `collection:` option, then each
210+
partial. If the value is a collection either implicitly or explicitly by using the `collection:` option, then each
211211
value of the collection is passed to the partial as the variable `some_symbol`. If the value is a singular object,
212212
then the object is passed to the partial as the variable `some_symbol`.
213213
@@ -219,7 +219,7 @@ Be sure not to confuse the `as:` option to mean nesting of the partial. For exam
219219
json.partial! @comment, as: :comment
220220
```
221221
222-
is quite different than:
222+
is quite different from:
223223
224224
```ruby
225225
# comment attributes are nested under a "comment" property

test/jbuilder_dependency_tracker_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def track_dependencies(source)
6161
assert_equal %w[comments/comment], dependencies
6262
end
6363

64-
test 'detects explicit depedency' do
64+
test 'detects explicit dependency' do
6565
dependencies = track_dependencies <<-RUBY
6666
# Template Dependency: path/to/partial
6767
json.foo 'bar'

test/jbuilder_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class JbuilderTest < ActiveSupport::TestCase
312312
assert_equal 'world', result['comments'].second['content']
313313
end
314314

315-
test 'nesting multiple chilren from a non-Enumerable that responds to #map with inline loop' do
315+
test 'nesting multiple children from a non-Enumerable that responds to #map with inline loop' do
316316
comments = NonEnumerable.new([ Comment.new('hello', 1), Comment.new('world', 2) ])
317317

318318
result = jbuild do |json|

test/scaffold_api_controller_generator_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ScaffoldApiControllerGeneratorTest < Rails::Generators::TestCase
4747
end
4848
end
4949

50-
test 'dont use require and permit if there are no attributes' do
50+
test "don't use require and permit if there are no attributes" do
5151
run_generator %w(Post --api)
5252

5353
assert_file 'app/controllers/posts_controller.rb' do |content|

test/scaffold_controller_generator_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase
5959
end
6060
end
6161

62-
test 'dont use require and permit if there are no attributes' do
62+
test "don't use require and permit if there are no attributes" do
6363
run_generator %w(Post)
6464

6565
assert_file 'app/controllers/posts_controller.rb' do |content|

0 commit comments

Comments
 (0)