09 Jul '13, 2am

@KinseyAnnDurham

@KinseyAnnDurham

Skinny Controllers, Skinny Models I hear a lot of people recommending the “skinny controller, fat model” approach to Rails development. I’m all for keeping controllers simple, but who wants a fat model? If your editor slows down while loading up your model files, I have some advice: put your models on a diet. Let’s say you have an application that needs to handle PDF documents. You have a very simple Document model to keep track of them: class Document < ActiveRecord::Base validates_presence_of :title has_attached_file :pdf validates_attachment_presence :pdf end It’s just you and a skinny, attractive model. It’s going to be a good day. But after your application has been live for a few days, it becomes clear that you need to provide a way to view these documents online, and your client’s weapon of choice is HTML . So, you add a method to convert your PDFs to HTML documents...

Full article: http://robots.thoughtbot.com/post/159807075/skinny-contro...

Tweets

.@KicksOnFire captured the Jordan Skinny High w...

kicksonfire.com 03 Jul '13, 7am

The high top sneaker was inspired by the Air Jordan 1, featuring the same leather build and construction. However, mesh ha...