lib/rabl/builder.rb in rabl-0.6.2 vs lib/rabl/builder.rb in rabl-0.6.3

- old
+ new

@@ -122,9 +122,15 @@ result end private + # Returns a guess at the format in this scope + # request_format => "xml" + def request_format + @options[:format] if @options[:format] != "hash" + end + # Caches the results of the block based on object cache_key # cache_results { compile_hash(options) } def cache_results(&block) if template_cache_configured? && Rabl.configuration.cache_all_output && @_object.respond_to?(:cache_key) result_cache_key = [@_object, @options[:root_name], @options[:format]]