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 indexes on database works!
When it comes to performance of an application, databases play very important role. And one of the key factor in database optimisation is index. Here, I tried to explain how indexes on database works.
Stimulus, Rails and RxJS for an SPA like experience
See how we can use Stimulus and RxJS along with server rendered templates to create a single-page-app like experience by just adding some sprinkles of Javascript.
Normalization, Consistency, and Clowne
This post discusses what could go wrong if you do not care of normal forms in your database design and demonstrates a particular example on how to fix something already broken with the help of the Clowne gem.
New in ruby-2.7.0 filter_map
Install ruby-2.7.0-preview using rbenv
Setting up Ruby-2.7.0-preview using rbenv
Scaling Your Ruby Service Objects with LightService
I wrote a quick guide to using the light service gem, which helps organize Ruby service objects. Check it out!
Ruby singleton_class example
In this post I tried to explain a use case of singleton_class.
Feedback wanted on new feature for Sail
Feedback on the following proposal would be very appreciated!
Modulator - tool for publishing Ruby methods as AWS lambdas behind gateway endpoints
Write regular Ruby code without dependencies and deploy it from generated CloudFormation template -
Announcing the release of Filtered gem.
The gem helps to create filters for Rails’ ActiveRecord in an old-fashion way. It makes your controller simpler and forms effortless. Check it out
Ruby 2.5 comprehensive changelog
Although the news are 1.5 years old, I believe it still could be interesting/useful: Ruby 2.5 changelog with references to docs, discussions, explanation of change reasons and code examples.
Ruby and GraphQL: what to use for your next project?
A lovely duet of two GraphQL gems with their week and strong sides:
A simple guide to add 2FA to your user's authentication API in ruby on rails
We’ll learn by doing, to add 2FA security feature to your user’s authentication API in ruby on rails. Here’s the Article
GraphQL on Rails
This guide is about building a Rails/GraphQL/React/Apollo application from scratch. A first part of the series is dedicated to queries - a GraphQL way to fetch the data.
I Updated Rails. Now Everything's on Fire.
Once a Rails app has bundled at the next version of Rails, it is common to have a number of errors to handle before your test suite will run. In this post, I walk-through one of the common issues we see. Read here
Testing A Locally Running App Inside VirtualBox
Yesterday I had to fix one of occurs-only-in-one-browser issues – so I ran VirtualBox, typed the address to my app into some legacy IE – localhost:9292 – and… it didn’t work. In this short blogpost is how I got it all to work together:
Meet trip, a concurrent tracer built on set_trace_func & implemented in pure Ruby.
trip.rb is a concurrent tracer that can pause, resume and alter code while it is being traced. The tracer yields control between two threads, typically the main thread and a thread that Trip creates. Under the hood, Trip uses Thread#set_trace_func. It could be used to implement a debugger.
[Screencast] Inline Editing Records
Using Rails UJS, we create an interactive row editing solution without using any kind of Javascript frameworks. https://www.driftingruby.com/episodes/inline-editing-records
Preventing minitest-focus during CI test runs
Minitest-focus is a great gem during development to only execute certain tests. However, it’s easy to miss and accidentally leave in while doing a CI test run, which could give false positives. Read here for ways to prevent during CI.