15 Jun '13, 9am

model view는 어떻게 써먹어야 되나 고민을 많이 했는데 이 예제를 보고 감탄했다. 역시 잘 쓴 예제 하나는 수백페이지 이론서도 이겨냄(은 오버인가..)

In this episode we’ll take a look a Draper , a gem that lets us add decorators to a Rails application’s views much like a presenter pattern. If you find that you have a lot of complex view logic in your templates and helper methods Draper can help to clean up this code by taking a more object-orientated approach. We’ll show you how it works in this episode.

Full article: http://railscasts.com/episodes/286-draper?view=asciicast

Tweets