1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00

Travis trigger :)

This commit is contained in:
Jeff Casimir 2011-09-20 15:59:22 +03:00
parent a1d16cbfa7
commit 203910c6dd

View file

@ -28,7 +28,7 @@ This gem makes it easy to apply the decorator pattern to domain models in a Rail
### 1. Object Oriented Helpers
Why hate helpers? In Ruby/Rails we approach everything from an Object-Oriented perspective, then with helpers we get procedural.The job of a helper is to take in data and output a presentation-ready string. We can do that with a decorator.
Why hate normal helpers? In Ruby/Rails we approach everything from an Object-Oriented perspective, then with helpers we get procedural.The job of a helper is to take in data and output a presentation-ready string. We can do that with a decorator.
A decorator wraps an object with presentation-related accessor methods. For instance, if you had an `Article` object, then the decorator could override `.published_at` to use formatted output like this: