Just wrote up how I set up SQLite backups for a Rails app using Litestream and Cloudflare R2
Litestream streams your database changes to S3-compatible storage in near real-time, and the litestream-ruby gem handles the Puma integration nicely
dcyoung.dev/shorts/setti...
#rubyonrails #webdevelopment
Posts by David
Reading Roundup is live.
Prototyping in code, Rails view performance, custom elements, vanilla CSS, and building elegant Ruby API clients.
Quick reads worth your time. Full issue here: dcyoungdev.substack.com/p/reading-ro...
#RubyOnRails #WebDevelopment #SoftwareDesign
I've been trying out Claude (desktop app) with an Obsidian MCP plugin - using all these words sounds more technical than it was π
It's been pretty good so far, it pulled together pretty decent weekly summarise based off daily entries.
I followed this without the optional steps dev.to/sroy8091/con...
API token code got you spooked? All that SHA256 hashing and secret key management scattered everywhere?
I found a cleaner way using `has_secure_password`, `authenticate_by` and `authenticate_or_request_with_http_token` in Rails.
Full writeup: dcyoung.dev/shorts/api-t...
dcyoung.dev/feed.xml
You might get less performance from using `.excluding` than `.where.not` and here's why.
dcyoung.dev/shorts/how-e...
#RubyOnRails #WebDevelopment
Yeah it's really nice. Will see how the print holds up after a few washes but didn't crack when gently stretched π
Looking forward to more designs π€©
Me wearing a Ruby t-shirt
Upped my geek level thanks to @andycroll.bsky.social and rubytshirts.com ππ
Example: You add a new column to your database and you want to fill it with some computed value. You calculate a score for each post based on interactions. You have a service `PostScorer.score_post(post)` that returns a number that you want to store in your new `posts.score` column.
What's your preference when it comes to data migrations in a Rails app?
I've used the data_migrate gem in the past with mixed success - I think it stopped working for me after an upgrade (gem or Rails)
Let's discuss the pros and cons.
#RubyOnRails
github.com/ilyakatz/dat...
I feel your pain, an asdf upgrade tried to take me down today!
I've had some good success with CUBE methodology.
piccalil.li/blog/cube-css/
Enjoyed this talk about the Shape of Service Objects. I like the separation of work explained and the visual representation of a Service Object is great π - off to find some code to analyse + refactor π§
www.rubyvideo.dev/talks/the-cu...
#RubyOnRails
Rubocop gem update adds a check to ensure Strong Params expect is being used.
@gorails.com have a great video explaining why this an important change
gorails.com/episodes/how...
#RubyOnRails #webdevelopment
This a web app, viewed on my phone through the browser π
I haven't consider any sort of mobile app, would probably go PWA to start with.
Rails `class_names` aka `token_list` helper is great for define #CSS classes in view components or partials.
Docs: edgeapi.rubyonrails.org/classes/Acti...
#RubyOnRails #CodeExample
Not a new #AppIdea for me but, an Instagram like clone for specific events like weddings. Guests share photos and videos to an event's timeline.
Could also handle RSVPs.
#RubyOnRails #webdevelopment #buildinpublic
We've been using the recipe and shopping list feature for a few months now πonly introduced the planner over the weekend so we'll see how it goes π
Meal Planner app finally got it's meal planning functionality
Allows us to add recipes to a day of the week. Already using this to plan this week's meals π
#RubyOnRails #webdevelopment #buildinpublic
bsky.app/profile/dcyo...
I'm sure there's a "better" way, but if we've gotten this far with Homebrew I'm sure we can keep going π
All my projects run on the same postgres version so Homebrew does the trick.
If I have a project on an older version, I'll upgrade - even if that's just making it run locally.
That being said none of my projects do anything "fancy" at the database level.
You could get a jumpstart by using some AI tools like www.usegalileo.ai
Has worked well enough to kick off some of my projects - doesn't replace a real human designer though.
Now I want to collate my thoughts, check my commits and write up what worked for me.
I'm running a few apps on a single Hetzner box, recently using SQLite, but I do have a couple of postgres apps too.
I've been doing this a lot recently, mainly to get better at Kamal and Docker things. Got my latest app deployed very quickly with only a handful of hiccups π
Who is the genius behind the Songs on Rails YT Channel? ππ€£
#RubyOnRails
youtube.com/@songsonrail...
Hey, I ended up backing out of Richer Text, the embeds were a bit too much for my use-case.
I did come across a couple of minor issues, would be happy to chat or raise them on GitHub, whichever you prefer.
I did find your blog post afomera.dev/posts/2022-1... this is what I needed thank you π
I've predicted that it'll also snow in May next year π€¦
Most of these places use Facebook to keep their customers up to date, however the feedback is rubbish and it tends to show up days later than needed.
Cafes, restaurants and takeaways in my area often have inconsistent opening times, and sometimes different locations (food vans)