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.

New gem 'multiples'!

When you want to step through all numbers that are divisible by either of two digits there is a palindrome pattern in that sequence (much like the patterns in frequencies that overlap). This gem discovers that palindrome and creates a custom enumerator like object that lets you step through each of those numbers. danielpclark/multiples This may help save you some time by not looping over non-multiples when iterating through any range of numbers.

Developing with Vagrant (ebook)

An ebook I wrote about how to use Vagrant to build a portable, efficient and flexible Rails development environment. Visitors of RubyFlow may use the discount code rbflw to get $5 off when buying the book on its website.

Architect Properly, and Know Your Tools

This post addresses some bad habits. I’ve seen a common thread in old apps, both my own and others’, where data which belongs in one model is duplicated and stored in another model, either for performance or convenience reasons. Knowing a few fundamentals of development, architecture and knowledge of the right tools for each job solves that. [more inside]

Introduction to ActiveRecord and ActiveModel Attributes API

Rails 5.0 is without a doubt a great release with plenty of useful changes and additions. The most notable change was probably ActionCable - the layer responsible for integrating your app with websockets. However, there were also other additions that could bring some substantial improvements to your Rails apps, but were a bit outshined by bigger changes. One of such features is Attributes API. [Read more]

How to Easily Configure and Run Multiple Rails Apps Locally

This post shows how I tackled the issue with running multiple apps that have conflicting services (notably, Sidekiq and Redis). Sometimes while you’re developing Rails apps, especially microservice architectures, you need to be able to run multiple apps on your development machine. Read on to see how I quickly and easily solved that problem using Foreman and a few configuration changes. [more inside]

flexible_permissions gem is out for flexible Ruby APIs!

For building APIs (and not only) I have been using Pundit gem for years. It’s an awesome gem. However there is a tiny issue: Pundit has a black and white policy whereas in APIs usually you need a grayscale. The user might have access to a specific resource/action, but only in certain attributes of that resource. That’s why flexible_permissions was born: a successful pattern I have been using for a couple years now is wrapped in a gem! Checkout the github page for more info!

Loading older posts