Upload ActiveStorage files to nested S3 path

ActiveStorage doesn't support any kind of nesting inside S3 bucket (as of Rails v6.0). But without nesting, managing Multi Tenant application will be just plain hard. Specially is you use different database/schema per tenant.

Serve your SaaS customer domains over HTTPS for FREE

Back is days at Haltrip, when we started to deploy our SaaS platform for the first time, we were given an estimation of max 10 clients. So we decided to invest less time into our DevOps automation. Business decision was to onboard every client manually. Fast forward few months, we already hit a wall!

Inspect Websites on iOS

Sometimes it's absolutely horrendous to debug a css/js issue just on iPhone. It's not reproducable on desktop, in responsive view, even not in simulators. But in actual devise it just winks at you!

How to parse first and last name from full name

Sometimes we need to split a full name into first name and last name parts. In Ruby String#split is the default thinking. If the name is just two parts, like "John Doe" it'd work like breeze.

How to generate slug with multiple candidate in Rails

Whenever working with any kind of of CMS, human readable URL comes as a natural requirement. I used to use firendly_id for this. It's a solid gem for this purpose and featureful.

Discard nil Hash values in Ruby

Sometime we need to cleanup a hash based for nil values. If you're using Rails/ActiveSupport it's really easy.