Permalink
Browse files

ugly ugly hack in this commit. the problem is i really need a callbac…

…k and

dont have time to do it right. someone please submit a good patch for this
  • Loading branch information...
1 parent 29f22f3 commit 9605d4c99a51bb4a30200dcf983367ee496df803 @jashmenn committed Nov 12, 2008
Showing with 9 additions and 5 deletions.
  1. +9 −5 sogi_extension.rb
View
@@ -25,11 +25,15 @@ class SogiExtension < Spree::Extension
# here. for now, if anyone doesn't define this they'll get a diff error that
# this method is undefined
#
- # unless self.respond_to?(:on_importing_error)
- # def self.on_importing_error(message)
- # ActiveRecord::Base.logger.fatal "There was a serious problem importing. You'd better check it out: #{message}"
- # end
- # end
+ # SORRY! HACK HACK. AmazonOrderMailer will NOT exist for everyone. However I
+ # have to get this done. Someone please submit a patch for good callbacks in
+ # this case.
+ unless self.respond_to?(:on_importing_error)
+ def self.on_importing_error(message)
+ ActiveRecord::Base.logger.fatal "There was a serious problem importing. You'd better check it out: #{message}"
+ AmazonOrdersMailer.deliver_error(message)
+ end
+ end
def activate
# admin.tabs.add "Sogi", "/admin/sogi", :after => "Layouts", :visibility => [:all]

0 comments on commit 9605d4c

Please sign in to comment.