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
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
If vs. Unless in Ruby
Do you find unless to be confusing? I know I do. Especially if it’s combined with one or more boolean operators. https://mixandgo.com/learn/if-vs-unless-in-ruby
stale_options 0.1.1
stale_options is a gem for caching HTTP responses. The gem was built with an idea to implement a class which will create options for ActionController::ConditionalGet#stale? method. It allows to cache any kind of object, not only record or collection (unlike of #stale?).
Write bash/zsh autocomplete in Ruby
This post teaches you to write Bash and Zsh support tab-completion scripts in Ruby! by saveriomiroddi
Digging into Rails' template finding
I just published my second post of the “Disassembling Rails” series to explain how Rails’ template finding works
Ruby's Sort and Sort_by
Whenever I hear the word sort in a programming context, I get instant flashbacks from my high-school days. It’s like going back in time for a few seconds. https://mixandgo.com/learn/ruby-sort-and-sort-by
Whay Is a Ruby Reducer?
The term comes from the world of functional programming, and it’s often paired with map. You’ve probably heard the term map/reduce if you’ve been in the programming world for more than a few months. https://mixandgo.com/learn/what-is-a-ruby-reducer
Spreadsheet Architect v3.0.0 Released
v3.0.0 of your favorite spreadsheet library for Ruby, Spreadsheet Architect, is now released! For those that don’t already know Spreadsheet Architect is the bee’s knee’s for creating any format of spreadsheets within your Ruby or Rails projects. Now you know. Check out the Changelog for the sweet deets. https://github.com/westonganger/spreadsheet_architect
What Is a Ruby Enumerable and Why Would You Use It?
The Ruby Enumerable module deserves the top spot in the popularity contest. It packs so many great methods that it’s hard to think of an application that wouldn’t use it.
How in demand are Ruby on Rails developers in 2018?
What are some of the stats around Ruby on Rails developer hiring in 2018? We examine an article by Yoel Blum. [more inside]
HTTPX (0.1.0) - an HTTP client
HTTPX is an http protocol client library in ruby which supports concurrent requests (using HTTP/2 and HTTP/1 protocol features), modular features and a simple API.
How to Use the Ruby Map Method
I think it’s so cool that the Ruby map method exists. It means that Ruby has support for higher-order functions, and functional programming. [more inside]
How to Use Strings in Ruby
I remember when I first heard about strings. I wanted to create a command line application that would ask the user for his name and age. Read it here
Scoping records to the current account in Ruby on Rails applications
A simple approach to ensure that user can only modify their own records in a Ruby on Rails application. [more inside]
E-Commerce on Rails: Inside Shopify's Tech Stack
Shopify is one of the oldest and largest Rails apps in existence. Today, they power over 600k online stores. This is how they’ve managed to scale with Rails.
Your business rules are objects too
Have you ever struggled to place a method that seems like it belongs equally well in either of two different classes? In this newly-free screencast from the RubyTapas archives, you’ll see a new way to think about ambiguously-homed methods.
Rails 5.2 added method write_multi to write multiple entries to cache store
Before 5.2 it was not possible to write multiple entries to cache store in one shot even though cache stores like Redis has MSET command to set multiple keys in a single atomic operation. Rails 5.2 adds method that allow us to set multiple entries at once. [more inside]
Custom Exceptions in Ruby
Almost everything in Ruby is an object, and errors are no exception. Learn to create your own exceptions in AppSignal Academy # 18 https://blog.appsignal.com/2018/07/03/custom-exceptions-in-ruby.html
Learn How to Use Ruby Arrays in Less Than 10 Minutes
Arrays are probably the most popular data structure you’re going to use in Ruby. Learn what you can do with them and how to use them effectively. Read it here
[Screencast] Editors
One question that I get asked most often is what editor, theme and extensions am I using for my editor. In this episode, we take a look at the different extensions and settings that I use. https://www.driftingruby.com/episodes/editors
Visualizing and optimizing JavaScript bundle size in Rails/Webpacker apps
This step-by-step tutorial will teach you how to analyze JavaScript bundle size compiled by Webpacker and will demonstrate a few configuration tweaks that could reduce the resulting JS size by hundreds of kilobytes.
Ruby on Rails Deploy Explained: Deploy to Dokku
A quide on how to deploy your Ruby on Rails app to Dokku, including the core aspects of setting a hosting account, swap, configuration, installing plugins, SSH deploy, redeploy and management.
How to Use the Each Method in Ruby
When it comes to doing the same thing over and over again, Ruby has a few methods you can choose from. But in this article, we’re going to look at the each method and what you can do with it. Read it here
Golang for Rubyists. Part 7. Comparison of useful methods in Ruby and Golang
A new article in the series about Golang from Rubyist’s perspective. http://zonov.me/golang-for-rubyists-part-7-ruby-and-golang-methods-comparison/