Have you ever thought about using R (the programming language) to run some analyses using data from a Ruby on Rails application? This tutorial will provide step-by-step walkthrough on how to connect a simple Rails app to R.
VCR::Errors::UnhandledHTTPRequestErrors? Here's one way to use VCR more efficiently.
Admit it: you like the unusual. We all do. Despite constant warnings against premature optimization, an emphasis on "readable code", and the old aphorism, "keep it simple, stupid", we just can't help ourselves. As programmers, we love exploring new things.
In that spirit, let's go on an adventure. In this post, we'll take a look at seven lesser-known ways to store data in the Ruby language.
These days, there are so many different choices when it comes to serving data from an API. In many cases, you just want to bring something to market as fast as you can. For those times, I still reach for Ruby on Rails.
When building an API in Rails, you need a good solution for structuring your JSON. ActiveModel::Serializers (AMS) is a sensible choice. It's powerful alternative to jbuilder, rabl, and other Ruby templating solutions. It's easy to get started with, but when you want to serve data that quite doesn't match up with the way ActiveRecord (AR) structures things, it can be hard to figure out how to get it to do what you want.
In this post, we'll take a look at how to extend AMS to serve up custom data in the context of a Rails-based chat app.
Request specs allow for higher-level testing of a Rails application (as compared to controller specs, for example). They still run in the same process as your application code, but instead of directly instantiating classes and invoking methods, they make requests to endpoints and validate the responses.
- ← Previous
- Next →