From 3f59cd308268754cf5cef1c2b35389d0be9482c1 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 1 Oct 2012 09:30:15 -0400 Subject: [PATCH] doc update --- lib/decorates_before_rendering.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/decorates_before_rendering.rb b/lib/decorates_before_rendering.rb index 380f9ef..a6dbae7 100644 --- a/lib/decorates_before_rendering.rb +++ b/lib/decorates_before_rendering.rb @@ -13,6 +13,17 @@ require 'active_support/core_ext/class/attribute' # # @thing_1 and @thing_2 will be decorated right before a rendering occurs. # +# You can also specify the decorator you wish to use for a particular instance variable: +# +# class StuffController < ApplicationController +# include DecoratesBeforeRendering +# +# decorates :thing_1, :with => ThingListDecorator +# decorates :thing_2 +# end +# +# @thing_1 will be a ThingListDecorator (or contain them), and @thing_2 will be a Thing2Decorator. +# module DecoratesBeforeRendering module ClassMethods def decorates(*unsigiled_ivar_names)