Agile Web Development with Rails 7: [solved]

AWDWR 7, page 152, page 153:
Hello everyone,
I’m a little bit lost on the hotwire part. I didn’t fully understand it.
On page 152 @rubys does the hotwire in one way. Then on page 153 he creates creatre.turbo_stream.erb
and add 2 turbo_stream.replace ...
. I understand he is showing 2 ways of doing it. However I feel like I got confused. This is a chapter I have to read multiple times.
Can someone explain more about this sentence on page 152: “Since we followed the default
naming conventions for the template, we don’t need to pass any arguments”. I know in rails we use a lot of conventions but this went over my head.
On page 153 I got lost at this line: format.turbo_stream { @current_item = @line_item }
, Where did @current_item
came from, where do we really use it? We don’t use it at our 2 turbo_stream replace ...
Mert
Popular Pragprog topics










Other popular topics









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