Remove unused dup. Let inject split hash for us
This commit is contained in:
parent
24ce3a1d7c
commit
286f08eb83
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user