RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

SOLID Review: Liskov Substitution Principle

Barbara Liskov introduced her substitution principle back in 1987 during her keynote titled Data Abstraction and Heirarchy. Today, it is one of the five SOLID principles in object-oriented programming. “Instances of any type should be replaceable by instances of its subtypes without creating incorrect behaviors.” How can we ensure that our classes abide by the Liskov Substitution Principle? [more inside]

New Datafiles for Top Football Leagues (en,de,es,fr,it) - e.g. use $ sportdb new top

Hello, I’ve added some more datafiles that let you build your own football.db - using free open public domain datasets - with a single command e.g. $ sportdb new fr2014-15. The new datafiles include: de.rb and de2014-15.rb; es.rb and es2014-15.rb; it.rb and it2014-15.rb; fr.rb and fr2014-15.rb; at.rb and at2014-15.rb; top.rb and top2014-15.rb (includes top leagues e.g. en,de,es,fr,it). Cheers.

A faster way to cache complicated data models

When your data model gets complicated, and your APIs hit that sad 1 second response time, there’s usually an easy fix: :includes. But if you want to cache your responses, you can only fetch one object at a time, and you can’t get all the benefits of :includes. So how do you get a fast response for your cached objects, and still load the objects that aren’t in the cache, quickly?

Loading older posts