Formulario: control errores |
class Article ApplicationRecord
validates :title, presence: true
validates :body, presence: true, length: { minimum: 10 }
end
|
Turbo, activacion |
application.html.erb:
<%= javascript_include_tag "turbo", type: "module" %>
Add gem "turbo-rails", "~> 1.0"
Run bundle install
Run bin/rails turbo:install
|
Procesos: rails |
lsof -wni tcp:3000, lsof -wni | grep rails |
Procesos: kill |
kill -9 [pid] [pid] |
VSCode: ajustar codigo a ventana
| alt-z |
VSCode: reconozca extensiones
| Iniciamos VSCode en directorio del proyecto$ code |