From 286f08eb831b372a2cd2f268f3c649a8eb37148d Mon Sep 17 00:00:00 2001 From: ccocchi Date: Mon, 22 Oct 2012 18:05:22 +0100 Subject: [PATCH] Remove unused dup. Let inject split hash for us --- lib/rabl-rails/library.rb | 1 - lib/rabl-rails/renderers/base.rb | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/rabl-rails/library.rb b/lib/rabl-rails/library.rb index e53bc4a..861fe96 100644 --- a/lib/rabl-rails/library.rb +++ b/lib/rabl-rails/library.rb @@ -21,7 +21,6 @@ module RablRails def compile_template_from_source(source, path = nil) if path && RablRails.cache_templates? @cached_templates[path] ||= Compiler.new.compile_source(source) - @cached_templates[path].dup else Compiler.new.compile_source(source) end diff --git a/lib/rabl-rails/renderers/base.rb b/lib/rabl-rails/renderers/base.rb index ef664d7..9c7fd0e 100644 --- a/lib/rabl-rails/renderers/base.rb +++ b/lib/rabl-rails/renderers/base.rb @@ -48,8 +48,7 @@ module RablRails # template source passed. # def render_resource(data, source) - source.inject({}) { |output, current| - key, value = current + source.inject({}) { |output, (key, value)| out = case value when Symbol