0.0
No commit activity in last 3 years
No release in over 3 years
Decorate all your instance variables just before render
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.12

Runtime

~> 1.0
 Project Readme

defer_draper

Decorate your instance variables before render

Installation

gem 'defer_draper'

Usage

Add before_filter :decorate_all in controllers you want to decorate.It accepts regular filter options, as :only, :except, etc

before_filter :decorate_all, only: [:index, :show]

All instance variables (starting with @) that have a decorator will be decorated before they are avaiable in the view.

TODO

  • Add a option to select what variables to decorate
    • decorate_all exclude: [:foo, :bar] # decorates all except @foo and @bar
    • decorate_all include: [:foo] # decorates only @foo
  • RSpec