RubyOnRails

Showing 1-9 of 15 results
EngineeringIcon ChevronBack-end

Choosing a Tech Stack Alternative - The Ups and Downs

by Viktar Basharymau

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
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 ChevronBack-end

5 Things You Have Never Done with a REST Specification

by Alexander Zinchuk

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

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 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 ChevronWeb front-end

How to Use Rails Helpers: A Bootstrap Carousel Demonstration

by Carlos Ramirez III

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
EngineeringIcon ChevronWeb front-end

The Publish-Subscribe Pattern on Rails: An Implementation Tutorial

by Ahmed AbdelHalim

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
EngineeringIcon ChevronBack-end

A Guide to Rails Engines in the Wild: Real World Examples of Rails Engines in Action

by Joe James

Why are Rails Engines not used more often? I don't know the answer, but I do think that the generalization of "Everything is an Engine" has hidden the problem domains that they can help to solve.

11 minute readContinue Reading

Join the Toptal® community.