https://davidmontesdeoca.dev/the-one-about-overriding-htmx-s-default-behavior-on-failure
#htmx #javascript #ajax #hypermedia #ruby #uicomponents #sinatrarb #html #css #tailwindcss #ai #claudecode #programming #dev
small snippet to let sinatra work with unicode endpoints:
```
require 'cgi'
require 'mustermann/pattern'
class UnicodePattern < Mustermann::Pattern
register :unicode
def === string
CGI.unescape(string) == @string
end
end
set mustermann_opts: {type: :unicode}
```
#SinatraRb #ruby
Is there a way to only include certain Helper modules depending on the Sinatra view or view directory? Yes I know that Hanami does this, but is there a way to provide similar functionality in an existing Sinatra app?
It seems that @sdogruyol did another performance and memory #benchmark where he compared @ruby's Sinatra (#Ruby 3.4.0) against @CrystalLanguage's @crystalkemal.
However, I don't think it's entirely fair though. π
You can find the repository over here:
https://github.com/sdogruyol/kemal-github-api
#rubylang #crystallang #crystallanguage #ruby #crystal #SinatraRb #sinatra