AlemaΓ±o's Avatar

AlemaΓ±o

@elalemanyo

Full-Stack Web Developer at @DotRubyDev 🧱 http://RailsbootUI.com Rails View Components for Bootstrap

13
Followers
54
Following
52
Posts
22.10.2024
Joined
Posts Following

Latest posts by AlemaΓ±o @elalemanyo

Preview
The Too Early Breakpoint An opinion on why we shouldn't switch to the smallest design too early.

Just read β€œThe Too Early Breakpoint” by @ishadeed.com β€” and once again, super inspiring to read.
Such a clear way of explaining a subtle responsive design problem, with practical takeaways you can apply immediately.
Always a pleasure to read your posts πŸ‘πŸ™
ishadeed.com/article/too-...

05.02.2026 10:55 πŸ‘ 7 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0
Post image

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

16.10.2025 11:02 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
XPath Playground | DotRuby Test XPath expressions against HTML snippets.

Just launched a little side tool πŸš€
Test XPath expressions against HTML snippets right in the browser.
Built with Rails + Nokogiri, CodeMirror, and Catppuccin ✨
Perfect for experimenting with XPath expressions πŸ§ͺ

πŸ‘‰ www.dotruby.com/tools/xpath-...

22.09.2025 10:48 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Adding File Validation to Lexxy Editor with Stimulus A simple Stimulus controller to validate attachments in the Lexxy editor β€” restricting file types and sizes before they get uploaded.

Inspired by @donnfelker.bsky.social’s Stimulus controllers for Lexxy, I built one that adds file type and size validation directly in the editor.

Big thanks to @jorgemanru and the @basecamp team πŸ™Œ

Full write-up πŸ‘‰ www.dotruby.com/articles/add...

18.09.2025 08:09 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Rails Without Ruby Yes, you can run Rails without installing Ruby. With VS Code devcontainers, your whole Rails setup lives inside Docker β€” no version managers, no sy...

You don't actually need Ruby installed to work with Rails locally 🀯
I wrote about this odd idea: β€œRails without Ruby”

πŸ‘‰ dotruby.com/articles/rai...

10.09.2025 15:07 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Need an extra email address but don't want to create a new account?
Most providers support plus addressing β†’ just add +something before the @.

All emails still arrive in your inbox, and you can filter them easily.

Example: bob+needanothermail@gmail.com πŸ“¬

26.08.2025 07:26 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Easy Redesign in Rails: Run Old and New Side by Side with :variants Rails variants are usually used to serve different views for devices β€” but you can use them for much more, like running a redesign side by side.

Redesigning a Rails app? πŸš€
We discovered an underrated feature: :variants.
With just one magic suffix you can run old & new layouts in parallel β€” no JS, no cookies, just Rails ✨
Full write-up πŸ‘‰ dotruby.com/articles/eas...

25.08.2025 13:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 πŸ›Έβœ¨

14.08.2025 11:04 πŸ‘ 1 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

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 βœ…

11.08.2025 11:24 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

🚨 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. πŸ‘‡

07.08.2025 08:49 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

πŸ’‘ 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? πŸ€”πŸ‘‡

07.08.2025 08:13 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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

31.07.2025 09:51 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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! βš“

30.06.2025 16:42 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 πŸ’ŽπŸ˜

26.06.2025 09:41 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 πŸ˜‰

05.06.2025 15:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

πŸ’‘ 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 πŸ™Œ

05.06.2025 14:59 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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...

21.05.2025 22:02 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - igorkasyanchuk/get-smart: Learn Ruby/Rails topics during your app’s boot time. Learn Ruby/Rails topics during your app’s boot time. - igorkasyanchuk/get-smart

πŸ’‘ Want your Rails app to teach you something new every time it boots?
Check out get-smart by igorkasyanchuk β€” it shows handy Ruby & Rails tips during startup.
A clever gem with a thoughtful touch πŸ’Žβœ¨
github.com/igorkasyanch...

19.05.2025 12:29 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Release v0.4.0 Β· BaseSecrete/active_hashcash What's Changed Prevent from password managers to submit the form before the stamp has been computed Added support for the "button" submit form tag Added Catalan language Added base_controller_clas...

I released version 0.4.0 of active_hashcash. Thanks to @ivanverges.bsky.social and @elalemanyo.bsky.social for their contributions.

ActiveHashcash protects Rails applications against bots and brute force attacks without annoying humans.

github.com/BaseSecrete/...

16.05.2025 09:21 πŸ‘ 5 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0
Post image

πŸ’‘ Turbo Tip: Preserve search state and update the browser's URL when paginating within a <turbo-frame> 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...

17.04.2025 15:19 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 🫠

16.04.2025 13:38 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image Post image

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 πŸ‘

11.04.2025 10:12 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - lostintangent/codeswing: VS Code extension for building web applications ("swings") using a interactive and editor-integrated coding environment VS Code extension for building web applications ("swings") using a interactive and editor-integrated coding environment - lostintangent/codeswing

Just discovered CodeSwing β€” πŸ”₯ VS Code extension for building live HTML/CSS/JS demos right inside the editor.
Made by github.com/lostintangent, who's behind lots of awesome dev tools. Definitely worth a follow!
github.com/lostintangen...

07.04.2025 09:13 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Screenshot of the following text: 
"πŸ‘‰ All about Code and Ruby
There a lot of code samples included; here are just some of them:

Andy Croll shared his Ruby solution to a Cassidoo coding challenge, using Rails' Active Support for time manipulation to find the longest time gap between a series of times.
Prabin Poudel shared a useful Ruby tip about Array.wrap
Hans Schnedlitz shared a tip about speeding up Rails migrations by using bulk migrations with the bulk: true option in change_table
Ruby Cademy highlighted String#scrub as an underappreciated Ruby method that helps clean up problematic character encodings
Victor Cobos shared a useful technique for detecting newly attached files in Rails with Active Storage, using before_save callbacks
David Heinemeier Hansson shared a code sample from Basecamp’s diff feature, unchanged since 2016, highlighting Ruby’s readability and longevity."

Screenshot of the following text: "πŸ‘‰ All about Code and Ruby There a lot of code samples included; here are just some of them: Andy Croll shared his Ruby solution to a Cassidoo coding challenge, using Rails' Active Support for time manipulation to find the longest time gap between a series of times. Prabin Poudel shared a useful Ruby tip about Array.wrap Hans Schnedlitz shared a tip about speeding up Rails migrations by using bulk migrations with the bulk: true option in change_table Ruby Cademy highlighted String#scrub as an underappreciated Ruby method that helps clean up problematic character encodings Victor Cobos shared a useful technique for detecting newly attached files in Rails with Active Storage, using before_save callbacks David Heinemeier Hansson shared a code sample from Basecamp’s diff feature, unchanged since 2016, highlighting Ruby’s readability and longevity."

Here are just some highlights from All About Code and Ruby section from:
@andycroll.bsky.social @coolprobn.bsky.social @hansschnedlitz.com @RubyCademy @elalemanyo.bsky.social @David Heinemeier Hansson

But there are much more code samples to be inspired and write beautiful #Ruby

07.04.2025 08:44 πŸ‘ 1 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0
Post image Post image

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 πŸ™Œ

02.04.2025 08:17 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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! πŸ‘‡

31.03.2025 21:43 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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...

18.03.2025 13:46 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

πŸš€ 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...

17.03.2025 10:01 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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. 😎

13.03.2025 10:16 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image Post image

✨ 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!

03.03.2025 16:54 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0