Now it’s an open @rubyonrails.org.web.brid.gy PR: Date.upcoming_date(month, day) 🎉
Proud to give back to the open-source community that gives us so much ❤️
Hope it gets merged 🤞
t.co/XD0hlDYenB
Now it’s an open @rubyonrails.org.web.brid.gy PR: Date.upcoming_date(month, day) 🎉
Proud to give back to the open-source community that gives us so much ❤️
Hope it gets merged 🤞
t.co/XD0hlDYenB
turbo_stream.toggle_css_class supports force:, just like the DOM API.
No need for manual logic — may the force: be with you 🛸✨
turbo_stream.toggle_css_class supports force:, just like the DOM API.
No need for manual logic — may the force: be with you 🛸✨
The hardest part? Finding the PDF form field names 🤯
We wanted to give back, so we built a tool to list them all:
dotruby.com/tools/hexapd...
Drag a PDF → see all field names → done ✅
The hardest part? Finding the PDF form field names 🤯
We wanted to give back, so we built a tool to list them all:
dotruby.com/tools/hexapd...
Drag a PDF → see all field names → done ✅
Instead of risking invalid or double ?s, use a proper helper that merges params safely. 👇
Instead of risking invalid or double ?s, use a proper helper that merges params safely. 👇
So I wrote a small helper method.
Sharing in case it helps someone — or if there’s a better way? 🤔👇
So I wrote a small helper method.
Sharing in case it helps someone — or if there’s a better way? 🤔👇
You can use .many? instead of count > 1 — more readable and sometimes faster!
💡 On relations: uses LIMIT 2
⚠️ On associations: loads all records
You can use .many? instead of count > 1 — more readable and sometimes faster!
💡 On relations: uses LIMIT 2
⚠️ On associations: loads all records
Turbo Drive intercepts clicks and replaces page content via fetch (not a full page reload) — and that breaks native #anchor scrolling.
Fix it with data-turbo="false"
Tamed the Turbo — anchor away! ⚓
Turbo Drive intercepts clicks and replaces page content via fetch (not a full page reload) — and that breaks native #anchor scrolling.
Fix it with data-turbo="false"
Tamed the Turbo — anchor away! ⚓
Always finding little gems in ERB 💎😍
Always finding little gems in ERB 💎😍
I wrote a small helper that uses model_name.human(count: ...) to do it the right way — fully i18n-ready.
Simple, readable, and it works with any model as long as it's been translated 😉
I wrote a small helper that uses model_name.human(count: ...) to do it the right way — fully i18n-ready.
Simple, readable, and it works with any model as long as it's been translated 😉
Use conditional_tag to wrap content in a tag only if a condition is true.
No more messy if blocks in ERB. Just clean, readable templates.
Discovered this gem thanks to @scarfacedeb 🙌
Use conditional_tag to wrap content in a tag only if a condition is true.
No more messy if blocks in ERB. Just clean, readable templates.
Discovered this gem thanks to @scarfacedeb 🙌
So I built github-repo-manager:
For when you're leaving a GitHub org and want to take all your repos without the manual drag-n-drop drama.
One script. No cardboard boxes. 🐙💼
github.com/elalemanyo/g...
So I built github-repo-manager:
For when you're leaving a GitHub org and want to take all your repos without the manual drag-n-drop drama.
One script. No cardboard boxes. 🐙💼
github.com/elalemanyo/g...
This promotes frame navigation to a full page visit, enhancing user experience.
📖 Learn more:
turbo.hotwired.dev/handbook/fra...
This promotes frame navigation to a full page visit, enhancing user experience.
📖 Learn more:
turbo.hotwired.dev/handbook/fra...
add this to your VS Code settings:
"remote.SSH.defaultExtensions"
now it auto-installs your favorite extensions when you connect
no more bare-bones VS Code sessions 🫠
add this to your VS Code settings:
"remote.SSH.defaultExtensions"
now it auto-installs your favorite extensions when you connect
no more bare-bones VS Code sessions 🫠
Just write Do and rotate it 90°
Boom 💥 You've got a minimalist one
Genius idea from @lopezcodes.bsky.social 👏
Just write Do and rotate it 90°
Boom 💥 You've got a minimalist one
Genius idea from @lopezcodes.bsky.social 👏
Same 😅
Now I just type :note, :tip, :warning, etc. and espanso.org fills it in for me ✨
Thanks terzi_federico for making this possible 🙌
Same 😅
Now I just type :note, :tip, :warning, etc. and espanso.org fills it in for me ✨
Thanks terzi_federico for making this possible 🙌
For has_one_attached or has_many_attached
Hope this helps someone save time! 👇
For has_one_attached or has_many_attached
Hope this helps someone save time! 👇
Turns out, you can silence them by just adding this:
--quiet-deps --silence-deprecation=import,global-builtin
No more noise! 🚀
sass-lang.com/documentatio...
Turns out, you can silence them by just adding this:
--quiet-deps --silence-deprecation=import,global-builtin
No more noise! 🚀
sass-lang.com/documentatio...
Just add a simple script to your package.json and update everything with one command.
Check out npm-check-updates → github.com/raineorshine...
Just add a simple script to your package.json and update everything with one command.
Check out npm-check-updates → github.com/raineorshine...
"debug.allowBreakpointsEverywhere": true
Turns out, you can set breakpoints literally anywhere — *.html.erb, *.turbo_stream.erb, you name it. No more “breakpoints can't be set here” nonsense. Feels like cheating, but it works. 😎
"debug.allowBreakpointsEverywhere": true
Turns out, you can set breakpoints literally anywhere — *.html.erb, *.turbo_stream.erb, you name it. No more “breakpoints can't be set here” nonsense. Feels like cheating, but it works. 😎
Want to show/hide fields based on selected option? No JS! Just use group-has-* from Tailwind.
#1: Show input when selected.
#2: Show a different <select> for each option.
🔥 Works great for forms with dynamic inputs!
Want to show/hide fields based on selected option? No JS! Just use group-has-* from Tailwind.
#1: Show input when selected.
#2: Show a different <select> for each option.
🔥 Works great for forms with dynamic inputs!
By default, VS Code doesn't treat .css files as Tailwind, so you miss out on IntelliSense.
Fix it by adding this to your settings! 👇
By default, VS Code doesn't treat .css files as Tailwind, so you miss out on IntelliSense.
Fix it by adding this to your settings! 👇
Check out how *:not-only simplifies selectors compared to v3. 🎨
play.tailwindcss.com/ZGTuORYG6W
Check out how *:not-only simplifies selectors compared to v3. 🎨
play.tailwindcss.com/ZGTuORYG6W
Tired of missing gems or npm packages when starting your Rails app? Add this to bin/dev script to install them before:
💎 bundle check || bundle install --quiet
📦 yarn install --frozen-lockfile --silent
🔗 Saves time, avoids surprises!
Tired of missing gems or npm packages when starting your Rails app? Add this to bin/dev script to install them before:
💎 bundle check || bundle install --quiet
📦 yarn install --frozen-lockfile --silent
🔗 Saves time, avoids surprises!
Needed this for a project 🙏— users confirm actions by entering a phrase or checking a box.
If you're using Stimulus, check it out: 👉 www.stimulus-components.com/docs/stimulu...
Needed this for a project 🙏— users confirm actions by entering a phrase or checking a box.
If you're using Stimulus, check it out: 👉 www.stimulus-components.com/docs/stimulu...