Rails

Rails Association Tips

Rails is one of those languages where you can infer how it should interpret code. A more simple way to word that is this: sometimes you'll be coding something for the hundredth time and all of a sudden you'll think to yourself 'I wonder if this will work' and you'll try to change a convention based on your previous experiences with that language. This recently happened to me and I wanted to share what I discovered.

We have a lot of named scopes in our app. Typically our named scopes look...

Read More

From the Dev Couch: All Ruby Baby

Rubyflow is a great Ruby blog aggregator. I subscribe to their RSS feed and every day there are multiple posts that either pique my interest or are relevant to gems or technology that I work with. I don't have time to read all of them everyday so I bookmark all the good ones and set aside a couple of hours every week to parse through them all. Featured in this post are the articles that I learned something from or determined are worth saving for a later date as it could become handy in the...

Read More

Refinery CMS Review

If you're looking to try out Refinery CMS for your app, there are a couple of things you should know ahead of time. If there is anything I don't cover in this review, shoot an email to dan[at]thredup.com and I'll see what I can do.

Background

Refinery is a Rails 3 compatible CMS gem that allows users to perform the standard Content Management System (CMS) tasks - create, edit and manage content on a website. However, given its Rails nature, Refinery is capable of much more than this. Refinery...

Read More

How to Dynamically Add a Selected Class to a Sub-menu

I haven't created any blog-worthy code contributions in Rails yet (hopefully soon), but I have something that I think is pretty cool to help people who have multi-level, navigation menu user interfaces...say that tens time fast. It's common UX practice to inform the user what page they are on through some sort of visual mechanism - i.e. you're on the 'Contact Us' page and the 'Contact Us' link is underlined or styled in a way that differentiates itself from other navigational items. This is...

Read More