52 Followers
154 Following
74 Posts
Web developer. Software engineer. Loves programming in Ruby, JavaScript, and on Rails. Believes in the Web and FOSS. Occasional blogger and triathlete. Recovering former middle school teacher. Full-time Dad.
websitehttps://rossta.net
twitterrossta
githubrossta
To give you an idea of how quick I am to adopt new tech tools, I have started watching The Sopranos

I’m working on a new article to summarize what I think you need to know before choosing SQLite to back your Rails app.

Joy of Rails runs on SQLite. I’m happy with my choice but that doesn’t mean it’s right for everyone.

Are you considering SQLite? What do you want to know?

I feel like it’s only a matter of time before one of you all makes a pghero for sqlite
ActiveRecord::Relation#with—apparently yet-to-be-documented (as far as I know)—is for representing Common Table Expressions. Good for: "I want to reference a subquery by name elsewhere in my query for selecting/ordering/joining etc."
ActiveRecord::Relation#excluding can be used in place of `where.not(id: id)`. Good for: "I have a reference to this thing record but I want to query the same table for other things."

I’m alway learning new things about Rails.

Just today I discovered ActiveRecord’s "excluding" and "with"—I already have a use for both in the Joy of Rails related pages query!

I don’t know who needs to hear this but

1. Next time
1. You write
1. An ordered list
1. In markdown
1. Just use 1.

If you’re looking for even more information about Web Push, check out the Pushpad blog. Not only does Pushpad share a lot of related content, but they also own maintain the web-push Ruby gem.

https://pushpad.xyz/blog

Articles about web push notifications - Pushpad

Luckily, the hairy details of Web Push on the server side (like Voluntary Application server Identification (VAPID)) are abstracted away in the web-push Ruby gem.

(I should know, I wrote its initial implementation of the VAPID protocol 😅)

https://github.com/zaru/webpush/pull/26

Implement VAPID authorization by rossta · Pull Request #26 · zaru/webpush

This PR is a work-in-progress and not ready to merge is ready for review. It is a fairly large set of changes internally that should be backwards compatible with webpush using GCM API key, while pr...

GitHub

Integrating Web Push notifications in your app can be a little tedious. Rails 8 promises to provide a new framework (Action Notifier) to make things easier.

If you want to learn how Web Push works or even how you could add it to your Rails app today, my article can help.