Permalink
Browse files

DelayedJob was not being created.

  • Loading branch information...
kurko committed Nov 8, 2011
1 parent d0611d0 commit e9e8dbe2dde95f36f97fff9ce86167d0180a8645
Showing with 6 additions and 7 deletions.
  1. +6 −7 lib/issue_closed.rb
View
@@ -55,16 +55,15 @@ def destroy_issue
module IssuesController
def self.included base
base.class_eval do
- alias_method :_edit, :edit unless method_defined? :_edit
+ alias_method :_update, :update unless method_defined? :_edit
- def edit
+ def update
status_before_update = @issue.status
- _edit
- if request.post? and \
- not (@issue.project.enabled_modules.detect { |enabled_module| enabled_module.name ==
- 'issue_closed' }) == nil and \
+ _update
+
+ if not (@issue.project.enabled_modules.detect { |enabled_module| enabled_module.name == 'issue_closed' }) == nil and \
status_before_update != @issue.status
-
+
to_destroy_id = @issue.delayed_job_id
delayed_job_id = nil

0 comments on commit e9e8dbe

Please sign in to comment.