RubyOnRails

Showing 1-9 of 16 results

Share

Timestamp Truncation: A Ruby on Rails ActiveRecord Tale

Tests should keep apps from being flaky. But tests themselves can become flaky—even the most straightforward ones. Here’s how we dove into a problematic test on a PostgreSQL-backed Rails app, and what we uncovered.

< 5 minute readContinue Reading
Maciek Rząsa

Maciek Rząsa

Choosing a Tech Stack Alternative - The Ups and Downs

If a web application is big and old enough, there may come a time when you need to break it down into smaller, isolated parts and extract services from it. Some of these will be more independent than others.

In this post, Toptal Full-stack Developer Viktar Basharymau explains how his team extracted an app from the monolithic Rails application that powers Toptal, and how the new service’s technical stack was selected.

11 minute readContinue Reading
Viktar Basharymau

Viktar Basharymau

Integrating Stripe and PayPal Payment Methods in Ruby on Rails

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
Henrique Reinaldo Sarmento

Henrique Reinaldo Sarmento

5 Things You Have Never Done With a REST Specification

The existence of RESTful APIs is a popular myth in web development—but it’s a myth we can work with. The right tools can help keep documentation consistent and streamline automated testing. In this article, Toptal Freelance JavaScript Developer Alexander Zinchuk explores several time-saving approaches to developing REST APIs, with examples in Node.js and Ruby on Rails.

13 minute readContinue Reading
Alexander Zinchuk

Alexander Zinchuk

Rails Service Objects: A Comprehensive Guide

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
Amin Shah Gilani

Amin Shah Gilani

Build Sleek Rails Components With Plain Old Ruby Objects

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
Eqbal Quran

Eqbal Quran

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

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
Botond Orban

Botond Orban

One of the most misused, misunderstood, and neglected of all the Rails built-in structures is the view helper. Helpers often get a bad reputation for being a dumping ground for one-off methods used across the entire application’s view layer. But what if your helpers could be more semantic, better organized, and even reusable across projects? What if they could be more than just one-off functions sprinkled throughout the view, but powerful methods that generated complex markup with ease leaving your views free of conditional logic and code?

Let’s see how to do this when building an image carousel, with the familiar Twitter Bootstrap framework and some good old-fashioned object-oriented programming.

7 minute readContinue Reading
Carlos Ramirez III

Carlos Ramirez III

The Publish-Subscribe Pattern on Rails: An Implementation Tutorial

The publish-subscribe pattern (or pub/sub, for short) is a messaging pattern where senders of messages (publishers), do not program the messages to be sent directly to specific receivers (subscribers). Instead, the programmer “publishes” messages (events), without any knowledge of any subscribers there may be.

This article provides insight in how to use the pub/sub pattern, in Rails, to communicate messages between different system components without these components knowing anything about each other’s identity.

8 minute readContinue Reading
Ahmed AbdelHalim

Ahmed AbdelHalim

World-class articles, delivered weekly.

By entering your email, you are agreeing to our privacy policy.

Join the Toptal® community.