Project

General

Profile

Patch #2599 » more_hooks.diff

CustomFieldsController hooks - Thomas Löber, 2009-02-02 09:18

View differences:

app/controllers/custom_fields_controller.rb (Arbeitskopie)
35 35
    if request.post? and @custom_field.save
36 36
      flash[:notice] = l(:notice_successful_create)
37 37
      redirect_to :action => 'index', :tab => @custom_field.class.name
38
      call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
38 39
    end
39 40
    @trackers = Tracker.find(:all, :order => 'position')
40 41
  end
......
44 45
    if request.post? and @custom_field.update_attributes(params[:custom_field])
45 46
      flash[:notice] = l(:notice_successful_update)
46 47
      redirect_to :action => 'index', :tab => @custom_field.class.name
48
      call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
47 49
    end
48 50
    @trackers = Tracker.find(:all, :order => 'position')
49 51
  end
(2-2/3)