I get it - you love Republicans and hate Democrats. I hate them all. Can you just connect a few more neurons in your brain and rise above it for a little bit and consider the costs? We're losing our rights and seeing a test of them live on video. Assuming we have elections again this can be used by both. Wake up dude.
Honestly I haven’t seen that video before now but are you kidding me? First of all cars don’t break like that from a kick. Second of all where’d the ford logo on the car go? Clearly AI. Classic AI video tells, it’s not even subtle.
Sad for you that you fell for it but not expected. If you don’t see murder in the original cell phone videos, you’ll rationalize this any way you can.
That's not what I said, I said I've witnessed AI cars explode like that, but I've never seen a real car explode like that. Ask yourself the simple question: where is that car? If that happened, let's see the actual car up close. Let's actually get a shot of that damage that occurred. We'll never see that because that car is not damaged in that way, because this thing is false.
> where everything you don't like is AI
This is projection. You're doing the same thing in reverse -- treating AI output with credulity because you want to believe it.
There are untrained MASKED federal agents killing American citizens. They pistol whipped Alex Pretti before shooting him. This is not normal. I think its appropo.
> Calling ICE "gestapo" and Trump "Hitler" and are genuinely crazy things, gestapo can be pretty accurately described by 1984 as the thought police, ICE, while being an organ of a state is far from that.
I'm not sure what you mean. The Gastapo was an organ of the state. Geheime Staatspolize means "Secret State Police."
According to your own numbers, Clinton and Obama managed to to deport 15 million people, and somehow they managed to do it without executing any citizens in the street.
No one is killing American citizens with immunity - except ICE. The man who killed Laken Riley is in Prison. https://en.wikipedia.org/wiki/Murder_of_Laken_Riley. Where are the masked agents who killed Renee Good and Alex Pretti?
This is awesome and I'm glad Rails is adding something official here. Unfortunately if you want to use the Dockerfile in development with docker-compose you will need to make some changes/additions.
Most notably: only precompile assets if deploying, not during development
The whole idea of Hotwire is to prevent `Rails.ajax` calls. You can easily accomplish this with less code:
1. Replace the `output` target with a Turbo frame.
2. Add a value to the `data-controller` div with a `preview-url`: https://stimulus.hotwire.dev/reference/values
3. Change the `Rails.ajax` call with `let url = URL.new(this.previewUrlValue); url.searchParams.append('body', this.tweetTarget.value; this.outputTarget.src = url.toString();`
4. Change the `preview` action to render HTML with the same frame.
Now you have an automatic refreshing frame with less code.
Once the complexity ramps up and the side effects compound, that's when I really appreciate server side rendering. And incidentally, that's exactly when I like to have the whole model!
I just refactored some old jquery stuff to use turbo and stimulus on a really complex form and it turned out well, I think. But below a certain level of complexity, it would have made sense to just do everything directly in stimulus with no AJAX at all.
I know your preview example is contrived (it's tough getting a real-world representative demo into a blog post, so please don't read this as criticism, I don't mean to say it's a bad example and I'm not trying to pick on it!) but really simple use cases are exactly the "sweet spot" for doing everything directly in the browser using Stimulus without having to call back to the server. Only once you start piling in business logic or reshuffling major parts of the display around does it fully pay off, and that's also about when you'll start appreciating having the whole model and the ability to re-use partials (rather than having to pick off a few pieces manually).
EDIT:
And just to be clear, in the sample code I put in above, you don't actually have to use the model. You can always just shove a single parameter into a special partial and go.
Perfect. I will try it, and perhaps update the post with this approach as well. Thank you. I haven't done anything with Turbo yet, although it's my next step. I first just tried to refresh my Stimulus knowledge with the 2.x changes.
But as for the AJAX call, I still think it's quite simple solution that most will instantly understand (and that's a good thing).
> "I will try it, and perhaps update the post with this approach as well."
this would be very useful, as there are not many comparative articles that really help you choose one approach over another. a number of years ago, i went through a couple rounds of turbo vs. ujs vs. websockets vs. custom js vs. something other library i don't remember atm, to try to figure out the best option for the app i was working on. lots of articles talk about the strengths of a library compared to others, but almost none walk through an example (or two) with enough depth to show those differences explicitly.