Tutorials

This is the code base for the UK Government's e-petitions service (https://petition.parliament.uk)
This is the code base for the UK Government's petitions service (https://petition.parliament.uk). We have open sourced the code for you to use under the terms of licence contained in this repository.We hope you enjoy it!A few things to know:You wi...

Configurable plain Ruby email validator. Performing email addresses validation via Regex, MX and SMTP
Configurable plain Ruby email validator. Performing email addresses validation via Regex, MX and SMTP - rubygarage/truemail. The Truemail gem helps you validate emails by regex pattern, presence of domain mx-records, and real existence of email ac...


Testing GraphQL Mutations In Ruby On Rails With RSpec
In the last article we added a few GraphQL mutations to our test application. It is time to create automated tests for each of them. But first things first, we need to set up RSpec in order to.In the last article we added a few GraphQL mutations t...


How to rotate log files in your Rails Application?
A common requirement in managing web apps is to rotate your application logs on a daily basis or based on log file size for heavily used apps. Most web frameworks have such as Rails ship with a default logging library that support some form of log...

Adds additional postgres functionality to an ActiveRecord / Rails application
Overtime the lack of updating to support the latest versions of ActiveRecord 5.x has caused quite a bit of users forking off the project to create their own patches jobs to maintain compatibility. The only problem is that this has created a wild w...



Use Dynamic Program to solve the sum of natural numbers using Ruby.
Given a range of natural numbers, from 1 to 100 for example, find the sum of all the given numbers. Below, we will implement some solutions then solve this on a small set of number that will work on any size of numbers that are in order.