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.
How to Create Search Form with Ransack
Ransack gem allows to create simple and advanced search forms for Ruby on Rails apps. This article explains how to use it.
Quest for Ruby Pattern Matching
An invitation to discuss possible pattern matching (or its elements) in future Ruby versions, and what could be introduced with minimal and reasonable changes to the language.
Ruby's attr_accessor, attr_reader and attr_writer
A Ruby object has its methods public by default, but its data is private. So if you need to access the data, for either reading or writing, you need to make it public somehow. Read it here
Docker for Rails Development
Docker for Rails Development is a step-by-step guide on how to use Docker to standardise a common development environment across a diverse team.
Frankenstein's ActiveRecord
Frankenstein’s ActiveRecord: How to stitch together complex ActiveRecord queries from simple parts has some great tips and techniques for working with your database using ActiveRecord. It includes some less well-knows Postgres features for grouping and manipulating data.
Accessibility on Rails
Accessibility on Rails outlines the specific A11y tips that you can add to your Ruby on Rails project to make it suitable for a large and diverse audience.
Five small hacks for your Ruby projects
Five small hacks for your Ruby projects are the top five tips and techniques built over a 13-year career.
Managing stripe for subscription payments in Rails
Managing stripe for subscription payments in Rails complete with code examples.
Announcing Rutie — The Tie Between Ruby and Rust
Rutie is a fork/offshoot from the ruru and ruby-sys projects. This project allows you to integrate Ruby into Rust and vice versa. This project’s values consist of:
Passenger 5.3.3: installer fixes
Version 5.3.3 of the Passenger application server for Ruby, Node.js, Meteor and Python has been released. This release contains fixes for a bug in the installer scripts for the Nginx and Apache modules: https://blog.phusion.nl/2018/06/26/passenger-5-3-3-installer-fixes/
Rails 5.2 uses AES-256-GCM authenticated encryption as default cipher for encrypting
RubyKaigi 2018 Review – conference in a nutshell
RubyKaigi 2018 has ended, but the excitement is still fresh. Here’s my extensive review of the authoritative international conference on the Ruby programming language, its talks and the parties that happened there.
Is Ruby pass-by-reference or pass-by-value?
As you learn your way through Ruby’s OOP, you will eventually stumble upon the concept of object passing. It might not be very clear if Ruby uses pass-by-reference or pass-by-value to send objects to a method. Read about it here
Object-Oriented Programming (OOP) with Ruby
Learn about Object-Oriented Programming (OOP) with Ruby, and become a better Ruby developer. Read it here.
Delegating Methods In Ruby With Forwardable
Are you working in a Ruby project and need to delegate methods but you don’t want to add a new gem just to do that? The Forwardable module is your answer and Ronney shows how you can use it with a practical example. [more inside]
Safely Migrating from Paperclip to Active Storage
Paperclip is now deprecated and a lot of Rails systems are using it. Migrating from Paperclip to Active Storage is scary when you have real data. This article describes the migration and how to test along the way for a confident switchover.
Digging into Rails fragment caching
Hello, I started a series of post called Disassembling Rails, and my first post is to explain how Rails’ fragment caching works.
Rails API + JWT auth + VueJS, Part 2: Roles
The article describes how to set up roles within VueJS SPA
Crystal is not Ruby Part 2
Crystal is a very interesting project that I have been following for the last couple of months. In part 2 I explore the cool bits of Crystal that are different from Ruby. [more inside]
Rails and Conditional Validations in Models
Adding consents for accepting Terms of Service/Privacy Policies must have been a top popular feature in the majority of the applications due to enforcement of GDPR in May ;). From the technical aspects that GDPR requires, there is a proof of consent for processing the personal information. In that case, you need to have some actual attributes in the database that would confirm the fact that some user has indeed accepted Terms of Service/Privacy Policy. [more inside]
CASL and Cancan. Permissions sharing between UI and API
An example of functional Rails5 API which shares CanCan defined abilities with Vue frontend with help of CASL
Create An Array In Ruby Without Square Brackets
A “Today I Learned” trick: [more inside]
Modular Monolith example in Ruby on Rails
An example of functional Rails application built using engines and local gems, check seeds.rb for credentials to use - article
sportweb - Instant sport.db Web Admin (Rails Engine) Command Line Tool / Server
Hello, for the world cup I’ve updated the sportweb command line tool that lets you browse your local sport.db / worldcup.db with a built-in instant web admin server (and rails engine). Browse all world cups (from Uruguay 1930 to Russia 2018) or build your own league / tournament. Cheers. Prost. Enjoy the beautiful game with ruby (and rails).