Tutorials


How to Implement SSO System in Rails Using CAS Server
Single-Sign-On is a hot topic right now. Several applications such as Google, Facebook, and Github use it. Probably you’ve noticed on some pages a “Sign in with Google” or “Login with Facebook” button which enables a user to log in to a page witho...

Implementing Roles and Permissions in Ruby on Rails
A common requirement of web applications is the ability to specify roles and permissions.For example, many types of web application will have a distinction between admins and regular users. This can often be dealt with as a simple boolean on the u...

Migrate a Rails Project from Paperclip to ActiveStorage
Paperclip was an infamous gem in the Rails world which provided file upload capabilities for Rails projects. The gem was deprecated shortly after the release of Rails 5.2, which included a similar built-in capability known as ActiveStorage. This g...

Resize and optimise images on upload with ActiveStorage
This posts describes how to reduce the size of images uploaded with ActiveStorage significantly by combining a few optimisations.There are user uploads in the app for other things but the above are specifically for images. DynaBlogger is a Rails a...


Re-Use SSH Config Inside Docker Containers with WSL2
Docker and WSL have been getting more and more chummy lately. The Docker Desktop WSL2 backend integrates Docker containers with the “official” integrated Windows/Linux ecosystem (boy that still feels a little weird to write…) and gains performance...

Squash N 1 queries early with n_plus_one_control test matchers for Ruby and Rails
Discover the performance testing alternative to detecting N 1 query problem in your Rails and pure Ruby applications.Every backend Ruby developer who works with databases through object-relational mappers like Active Record or rom knows the drill:...


Ruby on Rails(6 ) Uploading and Cropping images with Shrine, and Cropper.js
I was going around the internet to find a good guide to integrate shrine, and cropper.js to upload and crop the images. All those hours went into vain. So I have decided to give a quick overview on how to upload images with shrine, and crop them u...