imamulakhyar93 / rails-realtime-chat-app

This is a demo realtime chat application build using ActionCable, Turbo, Stimulus and Tailwind
0 stars 0 forks source link

any reason why use POST method? #2

Open saiqulhaq opened 3 years ago

saiqulhaq commented 3 years ago

https://github.com/imamulakhyar93/rails-realtime-chat-app/blob/bb62d2fd8ed6d4c550331264b03bbec95a00d994/app/views/messages/load.turbo_stream.erb#L4

imamulakhyar93 commented 3 years ago

Rails turbo doesn't assume GET method as turbo_stream request. They assume request as HTML

Yes I know it's a bit outside of the HTTP methods standard function😅 . but this did the trick to make the request work as turbo_stream.