Skip to content

Commit b555c5b

Browse files
author
Clara Raubertas
committed
changed scaffold
1 parent 9629d0e commit b555c5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sites/en/intro-to-rails/dog_scaffold.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ tip "If you killed the server with `Control-c` in the last step, you may need to
106106
end
107107

108108
step "Edit the view that displays your `dog` list" do
109-
message "Edit the file `app/views/dogs/index.html.erb`; put `<b></b>` tags on either side of the code `<%= dog.name %>`.
109+
message "Edit the file `app/views/dogs/index.html.erb`; add some text, such as "This dog's name is", before the code `<%= dog.name %>` (but after the `<td>` HTML tag).
110110
"
111111
explanation do
112112
message "Rails views use a combination of HTML and ERB (which is a kind of Ruby code)."
113113
message "Anything within a `<%= %>` is interpreted as Ruby code when the page is printed; for example, `<%= dog.name %>` will print whatever is in the `name` column for that `dog` record.
114114

115115
Anything within a `<% %>` is interpreted as Ruby code, but not printed out. For example, this page uses a *loop* to print out the same information for each `dog` record: the loop begins with `<% for @dogs.each %>` and ends with `<% end %>`.
116116

117-
All of the code within the loop gets executed once for each record stored in the `@dogs` array variable. Since you added the `<b></b>` tags within the loop, the boldness is applied to all the dogs in your database. (Add some more dogs to your database if you have less than two dogs right now, so you can see the loop in action.)
117+
All of the code within the loop gets executed once for each record stored in the `@dogs` array variable. Since you added the extra text within the loop, it will show up as many times as you have dogs in your database. (Add some more dogs to your database if you have less than two dogs right now, so you can see the loop in action.)
118118
"
119119
end
120120
end

0 commit comments

Comments
 (0)