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.
Simple, Async, Map/Reduce queue for Ruby
How DNSimple implemented parallel requests in near real-time with a simple Ruby queue.
Setting up a BDD Stack on a Rails 5 Application
An excerpt from Rails Testing Handbook, this post shows how to practically get started with behavior-driven development (BDD). We generate a new Rails 5 application with all the necessary tools, including RSpec and Cucumber, and get to the first green CI build. Read tutorial →
JsonschemaSerializer: turn your ActiveRecord models into json schemas
Have you ever considered to serialize your ActiveRecord models into valid jsonschema? You can get easily and for free thanks to this gem for jsonschema serialization. The first stable release of jsonschema_serializer is out and I would love to receive your feedback, feature or pull requests!
Why Do We Use Nil?
In this article we explore why do we use nil, the problems with nil & type checking, and what to do about it.
An Open Source Data Dictionary for Cities in RoR5 + React
As Cities start working through the ‘What Works Cities’ program, you quickly come upon the requirement to build a ‘data dictionary’. Looking around, everything looked like some variation of a spreadsheet, but I wanted to something that would help visualize and surface the data relationship between our myriad applications. [more inside]
Arel with Wharel
Wharel is a tiny little gem that uses the empty room pattern to make Arel queries easier to build. In this blog post, I walk through all 31 lines of this tiny gem and the features of Ruby’s object model that make it so simple and powerful.
Make your large number literals readable
If you’re new to Ruby from another language, you might not know about the features it has for formatting large literal numbers readably. Here’s a refresher in the form of a 45-second screencast!
Build a chat app with Ruby on Rails
In this tutorial, we’ll explore how to create a live chat system in Ruby while leveraging on the awesome features of Pusher Channels.
Ruby's magical Enumerable module
It’s time for another episode of Ruby Magic! In issue #13, we’ll look at one of Ruby’s most magical features, which provides most of the methods you’ll use when working with Ruby’s enumerable classes like Array, Hash and Range. We’ll learn about the Enumerable module and the Enumerator class, and we’ll make our own object enumerable by implementing #each from scratch.
TestProf II: Factory therapy for your Ruby tests
Vladimir Dementyev in an article for Evil Martians’ blog continues presenting his doctor bag full of diagnostic and optimization tools for tests: TestProf. This time, the focus is on factories: how they can slow down your RSpec and Minitest testing suites, and what can be done about it.
Building a Rails 5 JSON-based API? Easily transform incoming and outgoing JSON keys
API clients send and receive camelCase formatted keys. Your Ruby API code uses snake_case keys. Just add this gem: json_key_transformer_middleware
Conditional execution with DSL in Ruby
Replace if’s or exceptions with DSL:
Nice SQL prettifier for ruby
Nice SQL prettifier for ruby: [more inside]
How to add Material UI to your Rails + React App
Add Material UI to your Rails + React App! [more inside]
Async Reverse Geocoding with Ruby and Geocoder
Reverse geocoding using the Geocoder gem.
The Case for before_validation Callback: Complex State Normalization
A few months ago I wrote a blog post about ActiveRecord before_validation callback and how it is used for wrong reasons and concluded that in most cases this is not something we should be using routinely. However, I missed one appropriate use case for it which might be quite common in Rails apps, so this might be an excellent opportunity to get back to before_validation callback and show its other side. [more inside]
Spina CMS 1.0 released
After more than 3 years we are releasing Spina CMS 1.0! [more inside]
Zero downtime migration from Enum to Single Table Inheritance
Interested in migrating existing application architecture from Rails enum to single table inheritance, without users experiencing any downtime? This post details strategies for planning and implementing a successful architecture refactor. [more inside]
How to replace jQuery with Vue.js in Ruby on Rails apps
Ever wanted to switch from JQuery to Vue.js? Check out how in this article
Our Favorite Ruby on Rails Talks from RailsConf 2018
Didn’t get to go to RailsConf this year? We rounded up six of our favorite talks from the conference for you to check out. [more inside]
APISnapshot now publicly available on GitHub
APISnapshot is built using Elm and Ruby on Rails. Today we’re happy to announce that the code is publicly available on GitHub.
Capybara inconsistent click behavior and flickering tests
Sometimes writing feature specs can be painful. A short story of how Capybara tests were cured. Read the article.