Alemaño
banner
elalemanyo.bsky.social
Alemaño
@elalemanyo.bsky.social
Full-Stack Web Developer at @DotRubyDev 🧱 http://RailsbootUI.com Rails View Components for Bootstrap
Needed a helper to find the next occurrence of a date (birthdays, holidays, etc.), so I built it.
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
October 16, 2025 at 11:02 AM
Discovered a neat trick in the turbo_power gem by @marcoroth.dev 💡
turbo_stream.toggle_css_class supports force:, just like the DOM API.
No need for manual logic — may the force: be with you 🛸✨
August 14, 2025 at 11:04 AM
HexaPDF gem from @gettalong.bsky.social made it super easy to add PDF form filling to our rails app 🙌

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 ✅
August 11, 2025 at 11:24 AM
🚨 Rails tip: Appending query params with concat or + "?..." can break your URLs — especially if the URL already includes parameters.

Instead of risking invalid or double ?s, use a proper helper that merges params safely. 👇
August 7, 2025 at 8:49 AM
💡 I needed to check if a string is a valid app path in my Rails app — surprisingly, couldn’t find a built-in way.

So I wrote a small helper method.
Sharing in case it helps someone — or if there’s a better way? 🤔👇
August 7, 2025 at 8:13 AM
I remembered today and thought I'd share:
You can use .many? instead of count > 1 — more readable and sometimes faster!

💡 On relations: uses LIMIT 2
⚠️ On associations: loads all records
July 31, 2025 at 9:52 AM
Anchor links not scrolling correctly in your Rails app?
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! ⚓
June 30, 2025 at 4:42 PM
Just discovered you can add an if after a content_tag block in Rails views — way cleaner than wrapping the whole thing!
Always finding little gems in ERB 💎😍
June 26, 2025 at 9:41 AM
Pluralizing model names in Rails with proper i18n — there's a helper for that.
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 😉
June 5, 2025 at 3:01 PM
💡 Clean Rails views with conditional wrapping?

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 🙌
June 5, 2025 at 2:59 PM
Nobody likes to pack — not IRL, not on GitHub. 🧳

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...
May 21, 2025 at 10:02 PM
💡 Turbo Tip: Preserve search state and update the browser's URL when paginating within a by adding data-turbo-action="advance".

This promotes frame navigation to a full page visit, enhancing user experience.

📖 Learn more:
turbo.hotwired.dev/handbook/fra...
April 17, 2025 at 3:19 PM
make any ssh server feel like home 🏡

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 🫠
April 16, 2025 at 1:38 PM
Need a quick user icon but don't use an icon set?
Just write Do and rotate it 90°
Boom 💥 You've got a minimalist one
Genius idea from @lopezcodes.bsky.social 👏
April 11, 2025 at 10:12 AM
Ever forget how @github.com-flavored markdown does callouts?
Same 😅

Now I just type :note, :tip, :warning, etc. and espanso.org fills it in for me ✨

Thanks terzi_federico for making this possible 🙌
April 2, 2025 at 8:17 AM
Found a good way to check if a file was newly attached in Rails
For has_one_attached or has_many_attached

Hope this helps someone save time! 👇
March 31, 2025 at 9:43 PM
I was getting tired of my logs being flooded with Sass deprecation warnings when compiling bootstrap in my rails app 😩

Turns out, you can silence them by just adding this:

--quiet-deps --silence-deprecation=import,global-builtin

No more noise! 🚀
sass-lang.com/documentatio...
March 18, 2025 at 1:47 PM
🚀 Keeping your JavaScript dependencies up to date is easier than ever!

Just add a simple script to your package.json and update everything with one command.

Check out npm-check-updates → github.com/raineorshine...
March 17, 2025 at 10:01 AM
Just discovered a neat @vscode.dev setting:

"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. 😎
March 13, 2025 at 10:16 AM
✨ Conditional form fields with pure HTML & Tailwind!

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!
March 3, 2025 at 4:54 PM
🔥 Pro tip: Keep your VS Code devcontainer extensions personal! Add 'dev.containers.defaultExtensions' to your user settings.json and stop forcing your favorite extensions on your teammates. Your container, your rules!
February 10, 2025 at 10:38 AM
🔥 Enable Tailwind IntelliSense in .css files!

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! 👇
February 6, 2025 at 12:23 PM
🚀 @tailwindcss.com 4.0 dropped, and it's making things even cleaner!

Check out how *:not-only simplifies selectors compared to v3. 🎨
play.tailwindcss.com/ZGTuORYG6W
February 4, 2025 at 9:27 AM
🚀 Speed up your Rails dev setup!

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!
January 30, 2025 at 8:17 PM
Big shoutout to guillaumebriday for the new Stimulus Confirmation component! 🚀
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...
December 19, 2024 at 11:26 AM