RubyFlow The Ruby and Rails community linklog


The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.


Two levels deep Service Objects

I personally prefer small classes, short, single purpose methods over the one big piece of code. Having said that I have to admit that this approach has a significant downside - methods are short quite often because internally they call other methods, which call other methods, which call other methods… Let’s look at another approach to writing your Service Objects

Ruby 2.5 enables Thread.report_on_exception by default

Threads are hard to work because when they die then , by default, we don’t get much info. This new feature in ruby 2.5 would provide us more info when threads die due to an uncaught exception. Originally this feature was discussed 6 years ago. Read on to see why it took so long. [more inside]

Ruby instance_eval

Adding methods to an instance “on-the-fly” is a pretty common pattern in Ruby (activerecord, activesupport, etc..). [more inside]

Better sessions with JWT

Have you ever had issues building an authentication microservice or an API for your SPA using JWT? If so then today is your lucky day! [more inside]

Export your Rails performance metrics with scout_dogstatsd

Want your Rails performance KPIs (response time, throughput, error rate, time-in-queue, etc) in your DogStatsD-compatible metric system with almost zero effort? Try the scout_dogstatsd gem. scout_dogstatsd automatically instruments your web + background jobs, sending metrics to systems that support the DogStatsD protocol (like DataDog).

Loading older posts