diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-08-29 12:42:12 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-08-29 12:42:12 +0000 |
commit | 80c5f34c07a5b20648c353229c91a0c678ff9eb7 (patch) | |
tree | d1bffa7b9cd70d2439c3df63d2f9a730229c7063 /app/models/changeset.rb | |
parent | 1941f2b875f754da363a19bc01d3c3e576270ceb (diff) | |
download | redmine-80c5f34c07a5b20648c353229c91a0c678ff9eb7.tar.gz redmine-80c5f34c07a5b20648c353229c91a0c678ff9eb7.zip |
Rails3: replace deprecated 'after_create' to declared method at Repository model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6740 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/changeset.rb')
-rw-r--r-- | app/models/changeset.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 27565c6de..b34b3a5b8 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -44,6 +44,8 @@ class Changeset < ActiveRecord::Base named_scope :visible, lambda {|*args| { :include => {:repository => :project}, :conditions => Project.allowed_to_condition(args.shift || User.current, :view_changesets, *args) } } + after_create :scan_for_issues + def revision=(r) write_attribute :revision, (r.nil? ? nil : r.to_s) end @@ -86,7 +88,7 @@ class Changeset < ActiveRecord::Base self.user = repository.find_committer_user(self.committer) end - def after_create + def scan_for_issues scan_comment_for_issue_ids end |