The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
An article bringing together all the pieces I needed to understand how everything works. It finds the middle ground between specification and rote tutorial. [more inside]
PaperTrail’s versioning and
whodunnit to track auditing is fantastic. However, it falls apart if you have multiple user classes, such as
User. Read on to keep your auditing trail clean and exact. [more inside]
Displaying large, complicated reports was taking 6+ minutes to render in Chrome. I sped it up 180x using Rails to serve cached partials to Clusterizet
In this book review, I take a look at two older, but popular books on programming in Ruby. They are both well written, and I end up comparing them to numerous other books I’ve read on software design in addition to setting them against each other.
In this article, I will explore how to implement the Bit Array data structure in Ruby, and compare its performance to the implementation in the bitarray gem, which uses a more efficient, but slightly more complex implementation. Continue reading…
active_record_doctor helps you to identify database issues before they hit production. Version 1.2.0 can index foreign keys lacking an index and detect extraneous indexes (e.g. ones that can be replaced by a multi-column index) and take unique constraints into account.
Roll your own partial caching on Rails with Sunspot and Solr. Easy to do and stupid fast. Plus, fun to try out something a little different and watch it succeed spectacularly. [more inside]
Did you know that the only thing stopping you from using protected_attributes in Rails 5 is the gem dependencies and a small patch to ActiveRecord::Core. The rails repo of protected_attributes is not longer supported and issues and PR’s are denied. I have created the continuation of that gem protected_attributes_continued which supports Rails 5! https://github.com/westonganger/protected_attributes_continued
In this article, I explore one one of the ways to model weekly recurring events in a Rails application. We will build a system where your users can set up a weekly recurring reminder (eg. “send status reports at 5pm on Fridays”). Continue reading…
Have you ever tried to setup Devise and Doorkeeper in the simplest possible way, without oauth applications etc? Here’s my new blog post about this!
A blog post about refactoring a Rails application with the Trailblazer architecture. [more inside]
Rails 5 trims down session storage by removing discarded flash messages before persisting into the session. [more inside]
Should I test my project? Should I write dozens of tests for each feature? What kind of tests should I focus on? Not all projects are created equal - testing is the same. Sometimes you need to test hard, sometimes you don’t. I’m sharing a few observations on testing from my 16 yrs experience as a software developer. Test fundamentalists do not open ;-)
Ice_cube is a ruby library for effectively taking care of repeated events (schedules). The force lies in the ability to indicate multiple rules, and have ice_cube rapidly make sense of whether the schedule falls on a specific date (.occurs_on?), or what times it… read more
In this guide we will learn how to: Generate the Ruby on Rails application, Install Spree 3.1.0, Install Refinery CMS 3.0.0, Mount Spree before Refinery, Enjoy your new Spree-Refinery app: 5 easy steps to use Refinery CMS and Spree e-commerce on the same Ruby on Rails application