Cheatsheet about extending Ruby classes

Category: Ruby :: Published at: 10.06.2022

Here is my small cheatsheet which will help you to extend any Ruby class.

I found out it very helpful and i hope, it will also be a nice help for you.

Read more

About optimistic and pessimistic locking in Rails

Category: Ruby :: Published at: 07.06.2022

Ruby on Rails is very smart framework and it let us to handle with many things in very easy way.

There is no exception when we think about optimistic and pessimistic locking. I will show you how to handle it very fast.

Read more

Login with Google - Rails 6 Devise edition

Category: Ruby :: Published at: 27.05.2022

Today i will try to share with you my experience about signing in with Google on Rails application.

For this tutorial i will use Rails 6.1 with devise gem.

Read more

Refactoring Techniques in Ruby

Category: Ruby :: Published at: 23.05.2022

Refactoring process is very important and should not be underestimated by any software company.

Today i will try to extend my refactoring techniques knowledge and describe it here.

Read more

How accessors work in Ruby?

Category: Ruby :: Published at: 20.05.2022

Accessors can be hard to understand for new developers. 

In this article i will try to explain how they work and when to use them.

Read more

How to create custom Error with passing data

Category: Ruby :: Published at: 21.04.2022

Sometimes raising error is not enough. As probably you know, you can use command like this:

raise ActiveModel::StrictValidationFailed, "Some message"

This command will return 500 error on your website + it will log into your console the name of the error and message you passed in.

But it won't give you any context. This is big problem if for example you call API and your response is bad.
You want to know, what is happening there directly.

Fortunately there is some solution for it.

Read more