congrats! also I'm sorry your solidus sign is missing a few letters
Posts by Kasper Timm Hansen
one must be pur, the other pose
I shipped it in the app I'm working on after I wore myself down
Ah right, I guess we can't have classy temp names 😄
post-truth/
thar-be-dragons/
I tried that, but it didn't accept a constant path looking name. And then not having a const like name seemed like it would cause more trouble internally in Action Mailer, so I didn't bother looking more.
thanks! I think I might pursue this one further, there's been a few Action Mailer related things I've wanted in the past.
like ActionMailer::Address() that's also in there.
😂
class User::EmailVerification < ActiveRecord::AssociatedObject has_mailer to: :user, subject: "Verify your email and sign in" end
ActiveRecord::AssociatedObject.extend Module.new { def has_mailer(to: nil, subject: nil, process: nil, &block) # Use `class_eval` to subclass, so `Mailer#name` isn't nil. class_eval <<~RUBY class Mailer < ApplicationMailer helper_method def #{attribute_name} = params.fetch(:#{attribute_name}) helper_method delegate :#{record.model_name.element}, to: :#{attribute_name} end RUBY mailer = const_get(:Mailer) mailer.default template_path: name.underscore, template_name: "mailer" process ||= -> { mail to: ActionMailer::Address(public_send(to)), subject: } if to && subject process ? mailer.define_method(:mailer, &process) : mailer.class_eval(&block) define_method(:mailer) { self.class::Mailer.with(self.class.attribute_name => self).mailer } delegate :deliver_later, to: :mailer end }
Is this too much indirection?
Context: since Associated Objects let you write smaller objects, having Mailers with one action becomes common. And then the Mailer becomes mostly plumbing.
I think it makes in rv, but it could also be outside of it.
Eventually I'd love rv to have a built-in matrix command, so we could do stuff like
rv matrix 3.2+ run "<script code>"
and have it print out the results on the terminal
I was verifying whether Symbol#to_proc called private methods. I remembered it as doing so, but it doesn't! And at the very least hasn't done so since 3.2.
I verified this with:
class Hello; private def yo = :yo; end
:yo.to_proc.call Hello.new
Here's a nice rv win. Because Ruby installs take seconds it was super easy to verify behavior across many Ruby versions.
So I can just swap out the version and run my test code in irb like this:
rv run --ruby 4.0 irb
I was just looking for something like this, nice post @julianrubisch.at!
some odd ones on the guestbook, but I kinda like the silly ones too lol kaspth.com/guestbook
thank you to people who've signed it!
I have on occasion been failing and dipping into the 9,700 range. You feel noticeably worse and I do not recommend the experience.
Weeknotes: Hanami Minitest, merged! Awkward body parser middleware, gone! New guides version, initialised! Hanami mailer, getting close! Upcoming site, veiled in darkness!
timriley.info/posts/contin...
well that's easy though
miyazaki smoking
he looks miserable, and being highly emotive, in the clip I saw, just seems like overcompensating
someone shared the clip where he's elaborating this "wisdom" in Danish, and he's barely coherent anymore. it's just grievances and brainrot.
I chatted with @chael.codes about her upcoming @blueridgeruby.com talk, "Your First Open-Source Contribution." I had to know which was more intimidating…contributing to open source for the first time or live streaming? Full episode: www.youtube.com/watch?v=ovAb...
Zoo is hiring a Rust infra engineer! zoo.dev/jobs/4633118...
Come work with us, on our Rust services!
Ah nice! Yeah that's also where I landed with it. I'm not sure if I want to put in the work to make it production ready, but I figured the experimentation was good to share and might spark something for someone else.
It's been 4 years since I left Rails core, and my most impactful work has happened since I left.
Here's a writeup of it all:
kaspth.com/posts/i-quit...
Is that wild as in interesting or awful? 😂
Hell yeah thank you for using them!
I'm still proud of a lot of stuff in there. It does require a fair number of monkey patches to make work though 😅
take a trip to the cool shit store! population: you.
I chatted with @thomascannon.me about his upcoming @blueridgeruby.com talk, "5 ways to invest in yourself for the long haul." I wanted to hear why you should invest in yourself even if/when you have a great job. Full episode: www.youtube.com/watch?v=V8Zp...