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)
|
def compile_template_from_source(source, path = nil)
|
||||||
if path && RablRails.cache_templates?
|
if path && RablRails.cache_templates?
|
||||||
@cached_templates[path] ||= Compiler.new.compile_source(source)
|
@cached_templates[path] ||= Compiler.new.compile_source(source)
|
||||||
@cached_templates[path].dup
|
|
||||||
else
|
else
|
||||||
Compiler.new.compile_source(source)
|
Compiler.new.compile_source(source)
|
||||||
end
|
end
|
||||||
|
|
|
@ -48,8 +48,7 @@ module RablRails
|
||||||
# template source passed.
|
# template source passed.
|
||||||
#
|
#
|
||||||
def render_resource(data, source)
|
def render_resource(data, source)
|
||||||
source.inject({}) { |output, current|
|
source.inject({}) { |output, (key, value)|
|
||||||
key, value = current
|
|
||||||
|
|
||||||
out = case value
|
out = case value
|
||||||
when Symbol
|
when Symbol
|
||||||
|
|
Loading…
Reference in New Issue