Revision 730:4a9bb3b8d5cd vendor/plugins

View differences:

vendor/plugins/redmine_tags/init.rb
53 53
    IssuesHelper.send(:include, RedmineTags::Patches::IssuesHelperPatch)
54 54
  end
55 55

  
56
  unless ProjectsController.included_modules.include?(RedmineTags::Patches::ProjectsControllerPatch)
57
    ProjectsController.send(:include, RedmineTags::Patches::ProjectsControllerPatch)
58
  end
59

  
56 60
  unless AutoCompletesController.included_modules.include?(RedmineTags::Patches::AutoCompletesControllerPatch)
57 61
    AutoCompletesController.send(:include, RedmineTags::Patches::AutoCompletesControllerPatch)
58 62
  end
vendor/plugins/redmine_tags/lib/redmine_tags/patches/project_patch.rb
7 7
    module ProjectPatch
8 8
      def self.included(base) # :nodoc:
9 9
        base.extend(ClassMethods)
10
        base.send(:include, InstanceMethods)
10 11

  
11 12
        base.class_eval do
12 13
          unloadable
14

  
15
          attr_accessor :tag_list
16

  
13 17
          acts_as_taggable
14
          alias_method_chain :before_save, :save_tags
18

  
15 19
        end
16 20
      end
17 21

  
18
      def before_save_with_save_tags(context={})
22
      def before_save_with_save_tags()
23
#        debugger
24
        logger.error { "GONNA SAVE TAG LIST" }
19 25

  
20
        logger.error { "GONNA SAVE TAG LIST" }
21
        logger.error { @project.name }
26

  
27
#        params[:tag_list]
28
        
29
        
30
        # logger.error { @project.name }
22 31

  
23 32
    #    if params && params[:project] && !params[:project][:tag_list].nil?
24 33
    #      old_tags = context[:project].tag_list.to_s
......
34 43
    #    end
35 44
      end
36 45
      
37

  
46
      module InstanceMethods
47
        
48
      end
38 49

  
39 50
      module ClassMethods
40 51
        # Returns available issue tags
vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb
1
require_dependency 'projects_controller'
2

  
3
module RedmineTags
4
  module Patches
5
    module ProjectsControllerPatch
6
      def self.included(base)
7
        base.send(:include, InstanceMethods)
8
        base.class_eval do          
9
          unloadable 
10
          before_filter :add_tags_to_project, :only => [:save, :update]
11
        end
12
      end
13

  
14
      module InstanceMethods
15
          
16
        
17
        def add_tags_to_project
18
#          debugger
19
          logger.error { "TAG_LIST-->#{params[:project][:tag_list]}" }
20
        end
21
      end
22
    end
23
  end
24
end
25

  
26

  
27

  
28

  

Also available in: Unified diff