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 release of poly_belongs_to gem 0.3! via @6ftdan

PolyBelongsTo is a meta-programming friendly ActiveRecord method helper gem. This allows you to work with all DB relations in a uniform way. This gem also provides database integrity methods and record deep cloning functionality (with or without associations). It has been featured in Ruby Weekly #233 and featured in Green Ruby #118. This update includes child relation helper methods and has_and_belongs_to_many support.

The Pure Functions experiment

Today I would like to talk about pure functions and how they help to write better and maintainable code. I tried myself as an experiment and it resulted in mind change, for good of course, applicable to any programming language you use even though the term is more common in the functional programming (FP) community. This is not a new conclusion you might say, but for me it was. There are lots of new ideas coming everyday, lots from FP actually which is trendy ATM, but still you need to convince yourself something is good for you, you need to try it and see if you should move from evaluate to adopt in your tool set. That’s what I did and here are the results. Continue reading

Getting ready for new concurrency in Ruby 3 with Guilds

Ruby Guilds are the new way concurrency will be handled in Ruby 3. There’s still a long way to go until we reach that point, but I believe that we can already start implementing some of the concepts that will make our lives easier when we reach Ruby 3. In this article I try to describe some of things we should either do differently or avoid at all. [more inside]

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.

Loading older posts