Module: StaticMatic::RescueMixin

### Home Classes Methods

### In Files

- lib/staticmatic/mixins/rescue.rb

### Methods

- #render_rescue_from_error

### Files

- LICENSE

### Class/Module Index

Quicksearch

- StaticMatic
- StaticMatic::Base
- StaticMatic::BuildMixin
- StaticMatic::Configuration
- StaticMatic::Error
- StaticMatic::Helpers
- StaticMatic::Helpers::AssetsHelper
- StaticMatic::Helpers::CurrentPathHelper
- StaticMatic::Helpers::FormHelper
- StaticMatic::Helpers::RenderHelper
- StaticMatic::Helpers::TagHelper
- StaticMatic::Helpers::UrlHelper
- StaticMatic::HelpersMixin
- StaticMatic::RenderMixin
- StaticMatic::RescueMixin
- StaticMatic::Server
- StaticMatic::ServerMixin
- StaticMatic::SetupMixin
- StaticMatic::TemplateError
- Compass
- Compass::AppIntegration
- Compass::AppIntegration::Staticmatic
- Compass::AppIntegration::Staticmatic::ConfigurationDefaults
- Compass::AppIntegration::Staticmatic::Installer

No matching classes.

# StaticMatic::RescueMixin

### Public Instance Methods

render_rescue_from_error(exception) click to toggle source

Pass back an error template for the given exception

    # File lib/staticmatic/mixins/rescue.rb, line 3
    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)

      generate_html_from_template_source(File.read(error_template_path))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.