lib/rabl/partials.rb in rabl-0.9.0.pre2 vs lib/rabl/partials.rb in rabl-0.9.0.pre3
- old
+ new
@@ -41,9 +41,14 @@
fetch_sinatra_source(file, options)
else # generic template resolution
fetch_manual_template(view_paths, file)
end
+ # being used by cache digestor
+ if defined?(Rails) && Rails.version =~ /^[4]/
+ @_virtual_path = file_path.gsub('app/views/', '').gsub('.rabl', '')
+ end
+
unless File.exist?(file_path.to_s)
raise "Cannot find rabl template '#{file}' within registered (#{view_paths.map(&:to_s).inspect}) view paths!"
end
[File.read(file_path.to_s), file_path.to_s] if file_path