My old man trait is that I think SQL is easier to read and work with than arel, active record et al. Unless you're making libraries, just write the damn query. #rubyonrails#ruby#sql#PostgreSQL#php#mariadb
@tosbourn@davetron5000 Thanks for this! This is very much 🤯 for me, and dead useful atm, whilst looking at legacy codebase and technical debt. I spy a whole load of comment migrations coming to a DB near me, real soon
There's a story of developer (me) having a no good very bad morning because of this loaded gun that Rails leaves on the table.
Just imagine you're fixing some production data and you accidentally type User.update instead of user.update and realise you just updated not one, but every single record in the database with the same value.
Also, thank goodness for PostgreSQL point-in-time database restoration 😓
(I updated a field excluded from audit logs, of course)
Anyone know how to run an arbitrary command at the start of the #RubyOnRails asset pipeline process? I want to hook in to build an included javascript file on the fly, but my search-fu is completely failing me...
@Floppy but do consider scaling to a proper esbuild.config.js as per my previous Massive Gist; this stuff can only live in package.json for so long before the interdependencies get out of hand
In this episode I get the Basic Authentication NGINX configuration working using the envsubst tool to replace environment variables in the config file.
Question you want answered in a future video? Pair on a problem? Constructive feedback? DM me or email ask@saturdaymp.com.
California Bicycle Coalition / #CalBike 2024 Summit Advance Session "Success Stories from San Diego" included a presentation by Bike SD's ED Anar Salayev. He referred to importance of recognizing needs of small businesses while advocating for changes that make streets safer for people who bike & walk.
#RubyOnRails / #Django / #PhoenixWeb geeks: do any of you have any pointers for making an interpreted language webapp be able to update itself like a native app?
Has anyone made a library for handling this smoothly (in any lang)?
Was checking some large open source projects (like the Mastodon codebase) and it seems like this is a common pattern.
I'd still like to know why the match * actually means match /*. Started digging through the Rails codebase but I think I need to spend some proper thinking time on it, which I don't have right now!
A Ruby Gem that adds annotations to your Rails models and route files. - GitHub - drwl/annotaterb: A Ruby Gem that adds annotations to your Rails models and route files.
The Rails 7 Way by Lucas Dohmen, Tom Henrik Aadland and Obie Fernandez is on sale on Leanpub! Its suggested price is $40.00; get it for $24.50 with this coupon: https://leanpub.com/sh/6v1zu0uh#RubyOnRails