$ bin/rails c
irb(main):1:0> Account.first.update(name: “this is too long”)
Account Load (0.4ms) SELECT `accounts`.* FROM `accounts`
ORDER BY `accounts`.`id` ASC LIMIT 1
(0.1ms) BEGIN
Account Exists (0.2ms) SELECT 1 AS one FROM `accounts` WHERE
(`accounts`.`token` = BINARY 'a6db14e97e1f9fe7' AND
`accounts`.`id` != 1) LIMIT 1
(0.1ms) ROLLBACK
false
Slide 31
Slide 31 text
$ bin/rails c
irb(main):1:0> Account.first.update!(name: “this is too long”)
Account Load (0.4ms) SELECT `accounts`.* FROM `accounts`
ORDER BY `accounts`.`id` ASC LIMIT 1
(0.1ms) BEGIN
Account Exists (0.2ms) SELECT 1 AS one FROM `accounts` WHERE
(`accounts`.`token` = BINARY 'a6db14e97e1f9fe7' AND
`accounts`.`id` != 1) LIMIT 1
(0.1ms) ROLLBACK
ActiveRecord::RecordInvalid: Validation failed: Name is too long
(maximum is 20 characters)
…
…
…