Ruby Struct
Basic usageEmployee = Struct.new(:first_name, :last_name)employee = Employee.new(“John”, “Doe”)employee.first_name # => “John”employee.last_name # => “Doe”As you can see, it behaves like […]
Basic usageEmployee = Struct.new(:first_name, :last_name)employee = Employee.new(“John”, “Doe”)employee.first_name # => “John”employee.last_name # => “Doe”As you can see, it behaves like […]
Use Rails magic to speed up developmentEnum is a shortcut for the enumerated term, which means a set of named […]
Implement Redis-based locking mechanism Pushing a lot of jobs into Redis queue(s) for Sidekiq to process is very common in […]
Have you ever came across a code that verifies a lot of conditions to allow for some action? In normal […]
Routes engine is the core part of every Rails application. Thanks to the config/routes.rb file, we can easily define the […]
Retrying errors in a fashionable way Some processes are very error-prone. A good example is requesting the data from the […]
Transactions are an essential part of the Rails framework. Even if you are not using them directly, Rails is doing […]
Gemfile is a well-known file even for not experienced Ruby developers. While for most people, it’s evident that the purpose […]
Let’s just begin with something that every Rails developer that is using Sidekiq is familiarized with – a simple worker: […]
Building command-line application Our goal is to build a get_joke application that will render a random joke about Chuck Norris. The command […]