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.
From ActiveRecord Callbacks to Publish/Subscribe Pattern and Event-driven Design
Imagine that you are working on a large legacy application that also contains the dreaded ActiveRecord callbacks in the models handling most of the business logic. At some point, and under a certain level complexity, the mess caused by that choice might become hard to keep under control, the risk of introducing bugs will increase and the teams(s) working on the application will be way less productive. That will most likely lead to an attempt to find a better way of designing the application. The problem, though, might be that the scope of the application is so huge that introducing any meaningful changes to the application will take weeks, if not months. [more inside]
RubyGems Telegram BOT
Hi I started a little implementation of a Telegram Bot Around RubyGems.org API. Take a look at https://t.me/rubyg_bot, and give me some feedbacks. [more inside]
How to use railway-oriented business transactions to unclutter your Rails controllers
Ever felt that when your Rails app needs to handle complex business logic and multiple steps, your controllers’ methods can become a mess? [more inside]
Track email statuses in Ruby on Rails with SendGrid
When your application sends emails it is useful to know what happens to those emails, like whether it has been delivered, opened, or more importantly, bounced. In this post we’ll build a Rails application that can send emails with SendGrid and receive webhook events to track the status of those emails.
Ruby on Rails: The N+1 query problem
The N+1 query is usually the biggest cause of most performance issues, but very few people know about it. Today we are going to unmask it. [more inside]
Using Bootstrap with Webpacker
A “Getting Started” tutorial for setting up a Rails 6 application on Webpacker 4 with Bootstrap 4. https://rossta.net/blog/webpacker-with-bootstrap.html
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). https://github.com/skcc321/deploy_pin/
FlowTrace – remote app inspecting tool. Declare feature steps and receive params.
Just allows you to set contexts and send requests to the local machine. https://github.com/kirillshevch/flow_trace
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.
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.