Commits

Michael Granger  committed 533821d

Append the FancyErrors template path on plugin activation.

It was getting clobbered by the configuration being loaded.

  • Participants
  • Parent commits b6b2dbf

Comments (0)

Files changed (1)

File lib/strelka/app/fancyerrors.rb

 	end
 
 
+	### Inclusion callback -- add the plugin's templates directory right before activation
+	### so loading the config doesn't clobber it.
+	def self::included( mod )
+		# Add the plugin's template directory to Inversion's template path
+		Inversion::Template.template_paths.push( self.templates_dir )
+
+		super
+	end
+
+
 	# Class-level functionality
 	module ClassMethods
 		extend Loggability
 			super
 			self.log.debug "Setting up fancy error responses."
 
-			# Add the plugin's template directory to Inversion's template path
-			Inversion::Template.template_paths.push( Strelka::App::FancyErrors.templates_dir )
-
 			# Load the plugins this one depends on if they aren't already
 			obj.plugins :errors, :templating