diff --git a/guides/source/engines.md b/guides/source/engines.md index 6bbd68ff78..71844b7990 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -843,28 +843,10 @@ above the "Title" output inside `app/views/blorgh/articles/show.html.erb`: ```html+erb

Author: - <%= @article.author %> + <%= @article.author.name %>

``` -By outputting `@article.author` using the `<%=` tag, the `to_s` method will be -called on the object. By default, this will look quite ugly: - -``` -# -``` - -This is undesirable. It would be much better to have the user's name there. To -do this, add a `to_s` method to the `User` class within the application: - -```ruby -def to_s - name -end -``` - -Now instead of the ugly Ruby object output, the author's name will be displayed. - #### Using a Controller Provided by the Application Because Rails controllers generally share code for things like authentication