Ruby on Rails

Showing 1-9 of 23 results
EngineeringIcon ChevronWeb front-end

Integrating Stripe and PayPal Payment Methods in Ruby on Rails

by Henrique Reinaldo Sarmento

Secure payment processing is a key prerequisite for any eCommerce operation. If it fails, the consequences can be catastrophic for any company, big or small. In this article, Toptal Ruby on Rails Developer Henrique Reinaldo Sarmento outlines how you can create a Ruby on Rails eCommerce app, leveraging PayPal and Stripe for reliable and secure payments.

25+ minute readContinue Reading
EngineeringIcon ChevronTechnology

Rails 6 Features: What's New and Why It Matters

by Avant Mittal

Rails 6 is finally here, featuring major improvements and clever new features that should make development easier and faster than ever. In this article, Toptal Ruby on Rails Developer Avant Mittal dives into the Rails 6 changelog to introduce you to these new features and explain how you will be using them in your next Rails project.

9 minute readContinue Reading
EngineeringIcon ChevronBack-end

Rails Service Objects: A Comprehensive Guide

by Amin Shah Gilani

Rails ships with everything you need to prototype your application quickly, but when your codebase starts growing, you'll run into scenarios where the conventional Fat Model, Skinny Controller mantra breaks. When your business logic can't fit in either a model or a controller, that's when service objects come in and let us separate every business action into its own Ruby object.

11 minute readContinue Reading
EngineeringIcon ChevronBack-end

Field-level Rails Cache Invalidation: A DSL Solution

by Botond Orban

Fragment caching in Rails provides an easy yet a powerful way of improving your application's performance. However, some real-world scenarios do not work quite well with how the Rails cache behaves by default. In this article, Toptal Ruby on Rails Developer Orban Botond shows how you can implement a small DSL to optimize how the cache for related entities is invalidated to improve template rendering performance.

7 minute readContinue Reading
EngineeringIcon ChevronBack-end

Meet Phoenix: A Rails-like Framework for Modern Web Apps on Elixir

by Eduardo Bautista

In back-end software development, increased productivity often comes at the cost of performance. In this article, Toptal Software Engineer Eduardo Bautista shows us how the Phoenix framework builds on the familiar concepts from the Rails world, and makes it even easier to build robust concurrent applications without compromising performance.

9 minute readContinue Reading
EngineeringIcon ChevronBack-end

Build Sleek Rails Components With Plain Old Ruby Objects

by Eqbal Quran

Your website is gaining traction, and you are growing rapidly. Ruby/Rails is your programming language of choice. Your team is bigger and you’ve given up on “fat models, skinny controllers” as a design style for your Rails apps. However, you still don’t want to abandon using Rails? No problem. In this article, Toptal Software Engineer Eqbal Quran explains how you can decouple and isolate your Rails components using nothing Plain Old Ruby Objects. Ruby objects and abstractions can decouple concerns, simplify testing, and help you produce clean, maintainable code.

18 minute readContinue Reading
EngineeringIcon ChevronTechnology

Clean Code and The Art of Exception Handling

by Ahmed AbdelHalim

Exceptions are as old as programming itself. An unhandled exception may cause unexpected behavior, and results can be spectacular. Over time, these errors have contributed to the impression that exceptions are bad. But exceptions are a fundamental element of modern programming. Rather than fearing exceptions, we should embrace them and learn how to benefit from them. In this article, we will discuss how to manage exceptions elegantly, and use them to write clean code that is more maintainable.

12 minute readContinue Reading
EngineeringIcon ChevronWeb front-end

Grape Gem Tutorial: How To Build A REST-Like API In Ruby

by Botond Orban

In this tutorial, Toptal Engineer Orban Botond demonstrates how to use the Grape gem -- a REST-like API micro-framework for Ruby -- to build backend support in Rails for a JSON API. Grape is designed to run as a mountable rack engine that complements your web applications without interfering with them.

15 minute readContinue Reading
EngineeringIcon ChevronBack-end

Building a Color-based Image Search Engine in Ruby

by Nazar Hussain

With modern image editing tools, we often take for granted the ability to extract or identify color on some part of any image. However, doing it programmatically is not exactly so straightforward. Camalian, a Ruby gem, changes that, making extracting and manipulating colors in an image as easy as possible. In this article, Toptal engineer Nazar Hussain provides some insight into how various color spaces work, introduces Camalian, and gives an overview of how to use it to build a color-based image search engine in Ruby.

7 minute readContinue Reading

Join the Toptal® community.