
bradleyscollins
Agile Web Development with Rails 6: Rendered cart ERB and SASS do not match screenshot (P1.0 PDF pp. 146–148)
Looks as if the ERB and the SASS got out of sync. The rendered page with the ERB and SASS in the book yields the following—the grand total floating higher than the Total: label and without the border above it:
… which (ignoring the line items) does not match the screenshot on p. 148:
Suggest the following edits:
ERB, p. 146
…
<tfoot>
<tr>
<th colspan="2">Total:</th>
<td class="price"><%= number_to_currency(@cart.total_price) %></td>
<th class="price"><%= number_to_currency(@cart.total_price) %></th>
</tr>
</tfoot>
…
SASS, p. 147
…
tfoot {
th, th.price {
font-weight: bold;
padding-top: 1em;
}
th {
text-align: right;
}
th {
font-weight: bold;
text-align: right;
padding: 1em 0.5em;
}
th.price {
border-top: solid thin;
}
}
…
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /react-native
- /v
- /wasm
- /django
- /security
- /nodejs
- /centos
- /rails
- /haskell
- /fable
- /swift
- /gleam
- /js
- /deno
- /tailwind
- /assemblyscript
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /flutter
- /preact
- /actix
- /java
- /angular
- /ocaml
- /kubuntu
- /zig
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /keyboards
- /html
- /emacs
- /nim
- /vuejs
- /nerves
- /elm