Rails

Redis as a Shared Data Store Between Rails Apps

In my previous post [https://www.thegreatcodeadventure.com/managing-multiple-databases-in-a-single-rails-application/], we laid out a few scenarios in which two (or more!) separate Rails applications need to access the same data. Normally, shared data + lots of data === lots of expensive and slow database queries. One solution to this problem is to create…

Managing Multiple Databases in a Single Rails Application

What? Why? It may sound crazy at first, since most of the Rails applications we tend to work with connect to just one database. But, it actually isn't that unusual to have a single app communicate with more than one database. Consider the following use cases: source [http:…

Building a Custom OAuth Strategy for Doorkeeper

As Rails developers, we're all very familiar with using tools like OmniAuth and Devise to authenticate the users of our applications. In fact, I've used OmniAuth with so many of its integrations--Google, Twitter, Facebook, etc.––for so long, without ever really wondering how OmniAuth was working…

Rails Refactoring Part III: The Decorator Pattern

This is the third in a series of three posts that will demonstrate implementation of three common Rails design patterns: the adapter pattern [http://thegreatcodeadventure.com/rails-refactoring-part-i-the-adapter-pattern]; service objects [http://thegreatcodeadventure.com/rails-refactoring-part-ii-services]; the decorator pattern You can find the code for these posts here [https://github.com/sophiedebenedetto/issue-trackr]…

Rails Refactoring Part I: The Adapter Pattern

This is the first in a series of three posts that will demonstrate implementation of three common Rails design patterns: the adapter pattern; service objects [http://thegreatcodeadventure.com/rails-refactoring-part-ii-services]; the decorator pattern [http://thegreatcodeadventure.com/rails-refactoring-part-ii-the-decorator-pattern] You can find the code for these posts here [https://github.com/sophiedebenedetto/issue-trackr]…