Sha256: 0421626c934c1f311622dafc3e31b2408f9d5b265eb8e685d8df1d48fb8454ba
Contents?: true
Size: 781 Bytes
Versions: 9
Compression:
Stored size: 781 Bytes
Contents
module Mack module Rendering # Used when someone calls render(:xml => "rss_feed") class Xml < Base def render begin # Try to render the action: return render_file(options[:xml], options.merge(:format => :xml, :ext => ".xml.erb")) rescue Errno::ENOENT => e begin # If the action doesn't exist on disk, try to render it from the public directory: t = render_file(options[:xml], {:dir => MACK_PUBLIC, :ext => ".xml.erb", :layout => false}.merge(options.merge(:format => :xml))) return t rescue Errno::ENOENT => ex end # Raise the original exception because something bad has happened! raise e end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems