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.


Testing race conditions in your Rails app

Only 15 people can subscribe to a course, only limited number of people can buy this physical or virtual product, only 200 people can go to a concert, etc. How do you test that this limitation actually work? And not only work but that it works under heavy load, when there are multiple customers trying to buy the last item because it is a hot event or the product is offered with a big discount? [more inside]

Creating Ruby enumerators on the fly

When you treat your collections as enumerators, you get to use all your favorite functions like #map and #reduce without having to write any extra code. In this post I show you how easy it is to create enumerators on the fly, without defining extra classes or messing around with the Enumerable module.

Lovely, tiny example. You might also enjoy reading:…

Grape API Throttling with Grape-Attack gem

Grape-Attack has your API endpoints covered. Grape-Attack is a middleware for Grape to add endpoint-specific throttling. Will also take care of setting custom rate limit headers for you.

Looks like a very good start for a gem. I like the usage of adapters. Is there …
Absolutely, you can specify an identifier per endpoints like this: throttle max…
Oh sorry you meant per clients. Not yet but this could be a really nice feature…

Extending Pundit with dedicated policies

Pundit is a wonderful authorization library and it truly shines through the use of OOP and plain Ruby. However, when used with more than one or two user roles, policy objects can quickly become riddled with complex conditional logic. This article looks at how the basic OO concepts that underly Pundit can be put to good use to create dedicated policies per user role.

Yout HTTPS cert is untrusted The certificate is only valid for the following…
Yout HTTPS cert is untrusted The certificate is only valid for the following…

Opalist Newsletter Has Reached Issue 10

The Opal ecosystem continues to thrive, and projects like react.rb and Volt, opal-irb and Clearwater, are proving that front-end development via Opal has some real perks and some major productivity gains to offer (not to mention just plain Ruby fun!). Opalist keeps you up-to-date on the latest news around the Opal web. Check out Opalist Issue #10 here!

Locally Sourced: Using Tests to Add a Feature to a Rails Application

Noel Rappin has released a new sort-of book, “Locally Sourced: Adding a Feature to a Rails Application”, which describes the entire process of building features into Rails including integration and unit testing, and also covers the difference between traditional and mock tests. Get the issue at Support a Patreon campaign for more content at 404 … It’s working for me, you’re seeing a …
This line: Get the issue at has a…

How to exit a Ruby program

If you want your app to behave well in a unix environment, it’s important that it exit correctly. In this post you’ll learn all about unix exit codes, the mechanism that Ruby uses to exit a program, and how you can add custom behavior on exit. -

Error establishing a database connection
Stopped working for me as well.
Loading older posts