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.
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
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).
Why you should visit the next RubyKaigi
RubyKaigi is the annual Ruby conference organized in Japan. Have you been there this year? Let me tell you why you should visit this conference in 2019 🙌
Removing magic with magic (metaprogramming)
A case of safaley removing “magic” library (metaprogramming with implicit effects) using even more metaprogramming in legacy codebase. [more inside]
How This Home Maintenance App Uses Ruby on Rails
I interviewed the CTO of Jiffy, a Toronto-based home maintenance app built with Ruby on Rails. Here are some of his thoughts on the pros and cons of working with Rails. [more inside]
Extending Zendesk with the help of Zendesk App, Ruby on Rails API and CORS
We use Zendesk in one of our projects for processing users feedbacks and here is a story of how we developed our own Zendesk App to improve this service.
3 ways of iterating over tree-like ActiveRecord structures
Three ways of iteration over tree-like data structure and a comparison of their performance.
Using Replica database with your ActiveRecord models
Sometimes you may need to access not only your live production Database but also replica - for example, to lower down the CPU load on main DB. How to do it? How to keep the model in sync with the main model and prevent writes to it? I explained it in this blog post on Medium.
SpreadsheetArchitect v2.1.0 Released
Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets easily from ActiveRecord relations, Plain Ruby classes, or predefined data. https://github.com/westonganger/spreadsheet_architect
How to Build a Full-Text Search Form with Rails & AJAX
Create a Rails full-text search form that submits via AJAX to render results without a page reload.
Golang for Rubyists. Part 6. Structs, Methods and Interfaces
Sixth post from a series, which is intended to help Ruby developers to get a foot in the door of Golang.
Maily v0.7.0 release: Rails 5.2, new logo and more
A new version of Maily (https://github.com/markets/maily) v0.7.0 has been published. Mainly with Rails 5.2 compatibility, new logo, lots of UI tweaks, allow to hide emails and more.
Rails Testing Handbook on Kindle
You can now read Rails Testing Handbook, a hands-on guide to building better Rails apps with confidence using behavior-driven development on your Kindle:
Do You Know How Hash Table Works? (Ruby Examples)
Hash table is a data structure that stores data in key-value pairs. It is also named as a dictionary or associative array and it is one of the most useful data structures in a programmer’s toolbox. [more inside]
JSON Serialization in Rails: A Complete Guide
Find out how to implement fast JSON serialization mechanisms in a Ruby on Rails application using the best available solutions.
React Hot Reload in Rails
If you read my first article about switching from Sprockets to Webpacker and the second one about Hot Module Reloading of CSS, you will love to read this, where I will introduce you, step by step, to have Hot Module Reload working on your React components. [more inside]