From f42f6708129d63f9d2ebf4867971df02e51c7766 Mon Sep 17 00:00:00 2001 From: Jeff Casimir Date: Wed, 30 Nov 2011 11:37:59 -0500 Subject: [PATCH] Use @options instead of older @context --- lib/draper/decorated_enumerable_proxy.rb | 2 +- spec/draper/base_spec.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/draper/decorated_enumerable_proxy.rb b/lib/draper/decorated_enumerable_proxy.rb index dd43fea..b4914de 100644 --- a/lib/draper/decorated_enumerable_proxy.rb +++ b/lib/draper/decorated_enumerable_proxy.rb @@ -27,7 +27,7 @@ module Draper end def [](index) - @klass.new(@wrapped_collection[index], @context) + @klass.new(@wrapped_collection[index], @options) end def to_s diff --git a/spec/draper/base_spec.rb b/spec/draper/base_spec.rb index 77cb7c6..6a5e18b 100644 --- a/spec/draper/base_spec.rb +++ b/spec/draper/base_spec.rb @@ -312,7 +312,6 @@ describe Draper::Base do it "should allow decorated access by index" do subject = ProductDecorator.decorate(paged_array) - subject[0].should be_instance_of ProductDecorator end