3 days ago ā€¢ SupeRails

When receiving webhooks, don't forget to consider race conditions.

Here's an example where subscription.updated was received BEFORE subscription.created.

This resulted in the customer subscription status being "incomplete" in the app after a successful checkout. 

2 weeks ago ā€¢ SupeRails

šŸ¤  Footer navigation looks quite good on the SupeRails PWA.

It is inspired by instagram footer navigation.

My wife says "if it has a navbar with dropdown, it's a website; if it has bottom buttons, it's an app" šŸ˜… 

3 weeks ago ā€¢ SupeRails

šŸ¤© Playing with something really cool today - tracking changes in attributes (title, body) and displaying them as a diff. 

Column view and split view. 

Video coming soon! 

4 weeks ago ā€¢ SupeRails

Github Copilot is my #1 productivity tool. Much more useful in day-to-day coding than regular ChatGPT.

Here's a simple example of a kind of task I'd give to it's Chat feature: 

1 month ago ā€¢ SupeRails

šŸ¤  The HTML "fieldset" element has really nice default styling!

I'm using it to group form fields. Semantic HTML!!! šŸ’Ŗ

Official docs:  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset 
Rails docs:  https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-field_set_tag 

2 months ago ā€¢ SupeRails

šŸ˜² HTML has built-in tooltips!

All you need to do is add a "title" attribute to an HTML links or button

link_to "New comment", new_comment_path, title: "New comment"
button_to "Delete comment", comment_path(comment), method: :delete, title: "New comment"

šŸ«¤ It is possible to style them with CSS, however decreasing the delay before popping up is impossible.
This is a nice start, but I would still prefer building my own tooltips to have full control. 

2 months ago ā€¢ SupeRails

kill -9 $(ps -x | grep "Google Chrome" | awk "{print $1}")

This command kills all your Chrome browser sessions, even if they are not visible.

It is very useful when running system tests. I use it a lot! 

2 months ago ā€¢ SupeRails

This is the command I use these days to generate a new Rails app:

"rails new myapp --main -d=postgresql -c=tailwind -a=propshaft"

"--main" ensures that I have all the goodies that are not available with Rails 7, and will only be released with Rails 8 (presumably around RailsWorld 2024 in September)

My favorite new features:
āœ… Built-in PWA (Progressive Web App) support
āœ… Default Github CI config
āœ… Propshaft - lightweight version of sprockets
āœ… Brakeman - security scanner
āœ… Rubocop code linter

You can learn more about all the "rails new" options by typing "rails new --help" in your terminal. 

2 months ago ā€¢ SupeRails

Back on 2019 before generative AI was a thing me and a few friends created Intelilex that was like Github Copilot for Word docs.

šŸŖ™šŸŖ™ We sold for pennies. We were ahead of our time! šŸ¤Ŗ

šŸ”“ Check out the demo video here  https://youtu.be/_hM2l-c2fo4?si=3FiZO... 

InteliLex demo - explained

inteliLex

4 years ago ā€¢ 1,150 views

3 months ago ā€¢ SupeRails

In Ep#27 I discussed gem LetterOpener that let's you store and preview emails in development. 

Recently I learnt about gem LetterOpenerWeb, that provides a beautiful UI for emails in your tmp folder šŸ¤©

Check it out:  https://github.com/fgrehm/letter_opener_web