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.
Working with UUID in Ruby on Rails 6 with PostgreSQL
UUID is an alternative primary key type for SQL databases. It offers some non-obvious advantages compared to standard integer-based keys. Rails 6 release fresh out of beta introduces a new feature in ActiveRecord that makes working with UUID primary keys more straightforward. In this tutorial, we will dive deep into UUIDs with all their cons and pros. [more inside]
Using Bootstrap with Webpacker
A “Getting Started” tutorial for setting up a Rails 6 application on Webpacker 4 with Bootstrap 4.
Is learning Ruby on Rails actually a piece of cake?
Ruby on Rails is probably one of the few frameworks that developers keep coming back to. [more inside]
DeployPin - stick some tasks around a deployment.
Gives posibility to pin some tasks at different deployment stages (useful when you want to avoid doing non-db-related things inside migrations).
FlowTrace – remote app inspecting tool. Declare feature steps and receive params.
Just allows you to set contexts and send requests to the local machine.
ezmetrics v1.0.6 - a simple gem for capturing and displaying Rails metrics.
This gem captures and aggregates Rails application metrics such as:
duration, views, db, queries, status
and stores them for a variable timeframe. [more inside]
sportdb v2.0 - tool for reading datasets (leagues, clubs, matches, ...) into SQL DB
Hello, I’ve updated the sportdb command line tool / library that lets you read in (parse)
datasets (e.g. leagues, clubs, match schedules, etc.)
in plain text into your SQL database of choice (e.g. SQLite, PostgreSQL, etc.). For example, to build yourself a copy for the English Premier League 2019/20 season type: $ sportdb new eng2019-20. That’s all. This will read in the match schedule and much more from the /england dataset. Happy data and text wrangling with ruby. Enjoy the beautiful game. PS: See the football.db League Quick Starter Sample - Mauritius Premier League if you want to start from scratch (zero) with your very own league.
Mongoid - Inheritance: change embedded document's type via nested attributes
I published a post describing some issues I faced (and a workaround) when trying to change an embedded document’s type via nested attributes in Rails.
Simple gem for ocean/sea reverse geocoding (no external calls)
may be useful for your project [more inside]
10 New Things in Active Record
Take a quick dive with me and we’ll take a look at 10 new additions to Active Record in Rails 6.
Testing Times & Dates with Rails
Rails comes with some test helpers to make testing times and dates repeatable and reliable. Learn How to test Times and Dates in Rails
Argentinian validations
For all the argentinian developers out there (or others developing apps for argentinian people), I created a gem to validate specific user information from Argentina like CBU and CUIT. Check the gem here.
Closure in Ruby and Javascript
In this ARTICLE we are going to discuss about closures in Ruby and Javascript.
Who was hiring at RubyConf 2019?
List of companies hiring at RubyConf 2019 organized in Nashville. [more inside]
Filtration and Searching in Rails
In this ARTICLE we are going to discuss how to implement filtration or searching workflows step by step in Rails by keeping our Rails app clean and dry. [more inside]
where.not with nil in ActiveRecord Rails
In this ARTICLE, you are going to know how the “.not” with where query behaves and sometimes gives unexpected results.
Instance Variables vs Class Instance Variables in Ruby
In this article, we will going to discuss how the instance variable reacts when associated with the class itself and when with the object of class. Ruby
web_pipe: one-way pipe rack application builder
https://github.com/waiting-for-dev/web_pipe web_pipe is a modular rack application builder through a pipe of operations on an immutable struct. In order to use in conjunction with dry-rb ecosystem, see also dry-web-web_pipe. If you want to use it with a Rails project, don’t miss docs for the rails extension.
Pulling the trigger: Update counter caches without Active Record callbacks
A complete how-to on using database triggers in a Rails app for ensuring that aggregated values filtering is fast, consistent, and avoids nasty race conditions. No Active Record callbacks involved!
In Continuous Integration, Run Fast and Fundamental Tests First
It’s great to keep your CI/CD pipeline fast, but you don’t need it to run all tests to get feedback on WIP. [more inside]
Ruby refinements and the sorbet type checker
A quick look at how well ruby refinements play with the sorbet type checker.