Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor modification of init to deal with actionmailer being disabled

  • Loading branch information...
commit 224d907b58a8b250c217846f13ab3263779caa18 1 parent aeb11b6
@paulccarey authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 init.rb
View
17 init.rb
@@ -1,21 +1,30 @@
# Initializes theme support by extending some of the core Rails classes
+
require 'patches/actionview_ex'
require 'patches/actioncontroller_ex'
-require 'patches/actionmailer_ex'
+
+if defined? ActionMailer
+ require 'patches/actionmailer_ex'
+end
+
require 'patches/routeset_ex'
ActionController::Base.send(:include, ThemeSupport::ControllerExtensions)
-ActionMailer::Base.send(:include, ThemeSupport::ControllerExtensions)
+
+if defined? ActionMailer
+ ActionMailer::Base.send(:include, ThemeSupport::ControllerExtensions)
+end
# Add the tag helpers for rhtml and, optionally, liquid templates
require 'helpers/rhtml_theme_tags'
-# Commented out to remove the message
+# Commented out to remove the message
# "Liquid doesn't seem to be loaded... uninitialized constant Liquid"
#begin
-# require 'helpers/liquid_theme_tags'
+# require 'helpers/liquid_theme_tags'
#rescue
# # I guess Liquid isn't being used...
# STDERR.puts "Liquid doesn't seem to be loaded... #{$!}"
#end
+
Please sign in to comment.
Something went wrong with that request. Please try again.