Errata

Agile Web Development with Rails 6

Errata for Agile Web Development with Rails 6

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Other Digital Version V
Chapter 11 Task F

It seems like the details for implementation of the rest of the depot app are missing from this chapter on.
Is this an incomplete version?

Ricardo Nunes  Jul 17, 2020 
Printed Page 131
into first code block

bad:
assert_select 'li', 'Programming Ruby 1.9'

should be
assert_select 'main ul li', 'Programming Ruby 1.9'

because the assert_select the main navigation ul with Home inside the test fail

Anonymous  Mar 20, 2021 
Printed Page 146
block code carts/show.html.erb

````
<h2>Your Cart</h2>
```

should be

```
<h2>Your Pragmatic Cart</h2>
```

because there are test whict probe for this specific string

Anonymous  Mar 21, 2021 
Printed Page 147
block code scss

````
th, th.price {
font-weight: bold;
padding-top: 1em;
}
th {
text-align: right;
}
th.price {
border-top: solid thin;
}
```

should be

```
th, td.price { <=====
font-weight: bold;
padding-top: 1em;
}
th {
text-align: right;
}
td.price { <=====
border-top: solid thin;
}
```

Anonymous  Mar 21, 2021 
Printed Page 149
block code carts/show.html.erb

at five list item of playtime double than


> vent accessing any cart other than than one currently stored in the session

Anonymous  Mar 21, 2021 
Printed, PDF Page 179
4th paragraph (counting the code block as 1 para)

The following sentence has a typo: "The first argument, module: order". It should be "model: order".

Sam Partington  Oct 15, 2020 
Printed, PDF Page 185
code block at the top

The code block shows the line "belongs_to :product" as having changed, but actually it's the line below "belongs_to :cart, optional: true" which has changed, since the "optional: true" hash is new.

Sam Partington  Oct 19, 2020 
Printed Page 185
into first code block

default line_item.rb file is :

class LineItem < ApplicationRecord
belongs_to :product
belongs_to :cart

def total_price
product.price * quantity
end
end


change the arrow from this


class LineItem < ApplicationRecord
➤ belongs_to :order, optional: true
➤ belongs_to :product
belongs_to :cart, optional: true

def total_price
product.price * quantity
end
end



to this


class LineItem < ApplicationRecord
➤ belongs_to :order, optional: true
belongs_to :product
➤belongs_to :cart, optional: true

def total_price
product.price * quantity
end
end

Anonymous  Mar 22, 2021 
Printed Page 202
at jsx code block

IMHO, for coherence this code should have a ';' at the end

export default PayTypeSelector

Anonymous  Mar 23, 2021 
Printed Page 204
at jsx code block

second code block of jsx don't have the name of filename:

it should be:

app/javascript/packs/PayTypeSelector/index.jsx
```
import React from 'react'
class PayTypeSelector extends React.Component {
render() {
return (
....
);
}``
}


Anonymous  Mar 23, 2021 
Printed Page 205
at jsx code block

first code block of jsx don't have the name of filename:

it should be:

app/javascript/packs/PayTypeSelector/index.jsx
```
import React from 'react'
class PayTypeSelector extends React.Component {
render() {
return (
....
);


Anonymous  Mar 23, 2021 
Printed Page 227
at last code block

book said:

require 'ostruct'
class Pago
def self.make_payment(order_id:, payment_method:, payment_details:)


and should to say

def self.make_payment(order_id, payment_method, payment_details)

because are params

Anonymous  Mar 29, 2021 
Printed Page 272
last block of code

this code block dont show where code changed. it should use '>' like the rest of book :)

the same it is applied to 273, 274

Anonymous  Mar 31, 2021 
Printed Page 278
t block of code es.yml

this code block dont show where code changed. it should use '>' like the rest of book :)

Anonymous  Mar 31, 2021 
Printed Page 336
into first code block

sintax

def Order.find_on_page(page_num, page_size)
order(:id).limit(page_size).offset(page_num*page_size) #<=
end


def Order.find_on_page(page_num, page_size)
Order.order(:id).limit(page_size).offset(page_num*page_size) #<=
end

Anonymous  Apr 05, 2021