I recently had a problem which was solved by a polymorphic association and made things easy. Then came a twist: I needed model
B to have a reference to two identifiable instances of
I'm having a hard time explaining what the problem is without an example so I hope that the rest of the post and examples will shed light on that.
As I was writing my last post, I asked for help from a friend to choose a title. Middleman allows for posts to be for the
development environment only with the
published: false option, but it will not build the post when you run
middleman build. What I really needed was a way to build the post and have it served in a public environment, but avoid having it being listed anywhere: RSS feed, sitemap, index page, etc.
A few weeks back I released 2 gems (for Rails) that I use almost on a daily basis. One of them is a simple backport of a Rails 4 feature and the other one is the way I prefer to write and test SQL queries.
They're not perfect by any stretch, they don't have tests and both could use some refactoring. I like to follow the lean startup approach and release minimum viable products before investing more time in them.
TL;DR; Static pages and caching.
A blog such as this one is so simple that I couldn't imagine hosting anything other than static pages. I'm using Middleman for this, a powerful static site generator written in ruby. It gives you access to things like sprockets as well as extensions like middleman-blog making it really easy to get started if you're familiar with the Rails stack.