This! But without the coupling to ActiveRecord lifecycle hooks.
Our entire product is powered by these 30 lines of boring Rails code
![class Plans::Event < ApplicationRecord belongs_to :plan belongs_to :organization belongs_to :actor, class_name: "User", optional: true belongs_to :record, polymorphic: true, optional: true SUPPORTED_ACTIONS = %w[ plan_created plan_viewed comment_added # ... ].freeze validates :action, inclusion: { in: SUPPORTED_ACTIONS, message: "%{value} is not a valid action" } after_create_commit :broadcast private def broadcast Hubspot::Timeline.new(self).post_later! CatchUp::Inbox.new(self).post_later! Slack::Inbox.new(self).post_later! Metrics::Inbox.new(self).calculate_later! Email::Inbox.new(self).post_later! end end](https://pbs.twimg.com/media/GTGA5uuW0AAk_5y.png?name=small&format=webp)
ALT class Plans::Event < ApplicationRecord belongs_to :plan belongs_to :organization belongs_to :actor, class_name: "User", optional: true belongs_to :record, polymorphic: true, optional: true SUPPORTED_ACTIONS = %w[ plan_created plan_viewed comment_added # ... ].freeze validates :action, inclusion: { in: SUPPORTED_ACTIONS, message: "%{value} is not a valid action" } after_create_commit :broadcast private def broadcast Hubspot::Timeline.new(self).post_later! CatchUp::Inbox.new(self).post_later! Slack::Inbox.new(self).post_later! Metrics::Inbox.new(self).calculate_later! Email::Inbox.new(self).post_later! end end
2
1
206
Det här alltså :/ xitter.cf/omni_red/status/758359…
Mamma till man som dödades av polis: ”Han lyfte händerna för att be om nåd” omni.se/mamma-han-lyfte-hand… @GoteborgsPosten
@composeio We've started getting timeouts to mongodb (app is down), no info in status page. Admin interface super slow. What gives?
1
What I've been working on last couple of months: “A new digital home for Svenska Dagbladet” by @oktavilla medium.com/@oktavilla/a-new-…
I’m 🎉💣 on Emojli, the emoji-only network! Reserve your username now: emoj.li/#7aC87b6J7aC97bKj
Really enjoyed the cleancoders.com/category/bui… series with @coreyhaines Useful insights in a very cute format!
Looking for someone on @exercism_io to nitpick my javascript Bob exercism.io/submissions/51fd… <3
exercism.io is such an awesome tool for a programmer to get back from vacation mode. Fun to! Thanks @kytrinyx!
Replying to @lanyrd
“@myronmarston: rspec-mocks 2.14 will support spies thanks to the great work of @joeferris: github.com/rspec/rspec-mocks…” awesome!
Replying to @Fontscom
@Fontscom Using .mti-active for gracefull fallback no fonts are loaded at all. test-case-fonts.herokuapp.co… expected behaviour?
1
Replying to @Codecademy
@Codecademy It would be nice if it was possible to "send pull requests" to fix broken courses instead of waiting and hoping for a fix.
1
Mitt liv som barn - En film om barn i socialt utanförskap i Sverige.: youtu.be/XOH68FMxWG8 via @youtube
Sweet! ”@davidkjelkerud: Building a portfolio? Check out the great service @portfoliodeck. Happily made eleonorbostrom.se with it.”



