Revision 1249:774beb9b79da plugins/redmine_tags/lib/redmine_tags
| plugins/redmine_tags/lib/redmine_tags/patches/project_patch.rb | ||
|---|---|---|
| 11 | 11 |
|
| 12 | 12 |
base.class_eval do |
| 13 | 13 |
unloadable |
| 14 |
|
|
| 15 |
attr_accessor :tag_list |
|
| 16 | 14 |
acts_as_taggable |
| 17 | 15 |
|
| 16 |
Project.safe_attributes 'tag_list' |
|
| 17 |
|
|
| 18 |
# TODO: review need for this callback (uneeded on update) ~lf.03042013 |
|
| 19 |
after_create :save_tags |
|
| 18 | 20 |
end |
| 19 | 21 |
end |
| 20 | 22 |
|
| 21 | 23 |
module InstanceMethods |
| 24 |
def save_tags |
|
| 25 |
self.tags = Tag.transaction do |
|
| 26 |
@tag_list.each(&:save) |
|
| 27 |
end |
|
| 28 |
end |
|
| 22 | 29 |
end |
| 23 | 30 |
|
| 24 | 31 |
module ClassMethods |
Also available in: Unified diff