Skip to content

Commit 5316432

Browse files
authored
Merge pull request rails#50335 from takmar/fix-engines-documentation
[ci skip] Update outdated documentation for Engines
2 parents 9715b86 + ea49d27 commit 5316432

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

guides/source/engines.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ create app/views/blorgh/articles/edit.html.erb
329329
create app/views/blorgh/articles/show.html.erb
330330
create app/views/blorgh/articles/new.html.erb
331331
create app/views/blorgh/articles/_form.html.erb
332+
create app/views/blorgh/articles/_article.html.erb
333+
invoke resource_route
332334
invoke test_unit
333335
create test/controllers/blorgh/articles_controller_test.rb
334336
create test/system/blorgh/articles_test.rb
@@ -844,12 +846,12 @@ an author - represented by a record in the `users` table - with an article,
844846
represented by the `blorgh_articles` table from the engine.
845847

846848
Finally, the author's name should be displayed on the article's page. Add this code
847-
above the "Title" output inside `app/views/blorgh/articles/show.html.erb`:
849+
above the "Title" output inside `app/views/blorgh/articles/_article.html.erb`:
848850

849851
```html+erb
850852
<p>
851-
<b>Author:</b>
852-
<%= @article.author.name %>
853+
<strong>Author:</strong>
854+
<%= article.author.name %>
853855
</p>
854856
```
855857

0 commit comments

Comments
 (0)