Sha256: 30d73f5309ba4e93baecc418f7fa8ae0aa5da9d85b4c6ac45c6382d5dba52f4f
Contents?: true
Size: 806 Bytes
Versions: 1
Compression:
Stored size: 806 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::Configuration.public_directory, :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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mack-0.5.0 | lib/rendering/classes/xml.rb |