Sha256: 9064fae7d0a0de6437755ea2f71254ddcff7b414ad796ba2c453bed75e6511b2
Contents?: true
Size: 480 Bytes
Versions: 2
Compression:
Stored size: 480 Bytes
Contents
module StaticMatic::RescueMixin # Pass back an error template for the given exception def render_rescue_from_error(exception) rescue_template = (exception.is_a?(StaticMatic::TemplateError)) ? "template" : "default" error_template_path = File.expand_path(File.dirname(__FILE__) + "/../templates/rescues/#{rescue_template}.haml") @scope.instance_variable_set("@exception", exception) render_template(error_template_path) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
staticmatic3-2.1.10 | lib/staticmatic/mixins/rescue.rb |
staticmatic3-2.1.9 | lib/staticmatic/mixins/rescue.rb |