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.
Cache Crispies - Fast, Flexible Rails Serializer
Picking a method of doing JSON serialization in Rails has not been an easy decision as of late. Especially if you’re not able to break your APIs by moving to a JSON API structure. And trying to mix in a caching strategy, certainly doesn’t help. That’s the problem the new Cache Crispies gem was written to fix. [more inside]
The top Ruby Weekly links of 2019
- A look back at what proved popular with Rubyists last year.
How to create a complex testing context in a few seconds ?
A simple gem that generate a file with factories you need to test a specific object. It use you DB development to retrieve the object you want and all associations you need to setup the test.
Development must be fun
would like to add this to your project?
How to monitor you Rails app errors with Rollbar [tutorial]
A tutorial on Rollbar - second best Ruby on Rails error logger.
Rails, Routes, & Flags
In case it went under your radar. You can now use flags for rails routes. [more inside]
Duplicating models with complex nested associations
For one of our current project, we needed to duplicate model records as well as their children and recursive associations. That’s a fun thing to do … so we wrote what we found here
What's new in Ruby 2.7
Ruby 2.7 has introduced a few new features, like new syntax for pattern matching, startless ranges and numbered parameters, while some others like the pipeline operator and the method reference operator didn’t make the cut. Here’s a quick summary: [more inside]
Dependency Injection in Ruby
A handy pattern for writing code called Dependency Injection can make your code more flexible and more testable. It doesn’t take much, but it can make a huge difference. Learn how to use Dependency Injection in Ruby
All blogs about Ruby in one place.
A curated list of Awesome Ruby Blogs and Newsletters for Ruby Developers and Newbies
fstrings: Powerful formatting strings
Python-alike fstrings allow to use interpolation + formatting tags + custom objects formatting: f"Pi value is {Math::PI = %.3f}, today is {Time.now %Y-%m-%d}" => "Pi value is Math::PI = 3.142, today is 2020-01-08"
Monitoring your Rails application errors with Sentry [Guide]
A comprehensive guide to monitoring your app with most popular logger - Sentry
Build a contact form using ActiveModel, I18n and custom validations
Use Ruby on Rails to build a contact form for your website with ActiveModel, I18n for custom translations and conditional validations.
Building The Best Magic Link
I wrote this article on what you should consider if you are going to be implementing a magic link sign in for your application. [more inside]
Ruby Reference updated for Ruby 2.7
Ruby Reference is intended to be most full, actual and accessible language reference. Most of the reference content is taken directly from Ruby documentation and reorganized for easier reading. The core docs were augmented with some quotes from the Ruby website, and some missing content that is written specifically for the book. The source of the book (rendering scripts, config, and unique content) can be found at GitHub. Today I am releasing the new version, which was fully re-rendered for Ruby 2.7 and also includes some content and style fixes. Changelog.
Inheritance and Abstract Class Pattern for Rails Controllers
Inheritance is often frowned upon, because “You wanted a banana but got the whole jungle…“. In some scenarios, it can be a viable alternative to modules composition for sharing behavior. In this tutorial, I will describe a practical use case where using abstract base class pattern plays nicely with the Rails controllers layer. [more inside]
Ruby 2.7 pattern matching after 10 months of professional Elixir
I looked at the experimental pattern matching in Ruby 2.7.
[Screencast] Like Relationships and Global ID
In this episode we create a Like/Unlike system where users can like posts and use Global ID to obfuscate IDs. https://www.driftingruby.com/episodes/like-relationships-and-global-id
Rails PG Extras - PostgreSQL database performance insights
Rails port of Heroku PG Extras. The goal of this project is to provide a powerful insights into PostgreSQL database for Ruby on Rails apps that are not using the default Heroku PostgreSQL plugin. [more inside]
How to use React with Ruby on Rails 6
Learn 3 different ways to use the latest version of React.js with Rails 6
Tutorial on using RoR with GitHub and CircleCI
An ultimate guide to setting up your Rails project with GitHub and CircleCI
Migrate Your Rails App from Heroku to AWS Lambda
Are you someone with a pet Rails project running on a Free, Hobby, or Professional Heroku plan? Perhaps your company or freelance gig has a valuable, but infrequently used, Rails application? Such applications make great candidates for both AWS Lambda & Aurora Serverless using The New ActiveRecord Aurora Serverless Adapter.