How to Set Up a Rails SAML Identity Provider

Security Assertion Markup Language (SAML) is a protocol for single sign-on. SAML handles communication between a service provider (SP) and an identity provider (IdP). The identity provider acts as an authentication and identification mechanism for service providers. In this post, I’ll walk you through setting up your Rails application as a SAML IdP. This post […]

Active Record Aggregate Fields via Sub-Selecting Scopes

I was recently working on a piece of code from a legacy Rails application. An unusually large number of queries being run on a particular page let me know there was an N+1 query lurking. The application was an online assessment platform dealing with assessments, questions, and responses. The question listing page was simply asking […]