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
This commit is contained in:
parent
1941f2b875
commit
80c5f34c07
@ -44,6 +44,8 @@ class Changeset < ActiveRecord::Base
|
|||||||
named_scope :visible, lambda {|*args| { :include => {:repository => :project},
|
named_scope :visible, lambda {|*args| { :include => {:repository => :project},
|
||||||
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_changesets, *args) } }
|
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_changesets, *args) } }
|
||||||
|
|
||||||
|
after_create :scan_for_issues
|
||||||
|
|
||||||
def revision=(r)
|
def revision=(r)
|
||||||
write_attribute :revision, (r.nil? ? nil : r.to_s)
|
write_attribute :revision, (r.nil? ? nil : r.to_s)
|
||||||
end
|
end
|
||||||
@ -86,7 +88,7 @@ class Changeset < ActiveRecord::Base
|
|||||||
self.user = repository.find_committer_user(self.committer)
|
self.user = repository.find_committer_user(self.committer)
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_create
|
def scan_for_issues
|
||||||
scan_comment_for_issue_ids
|
scan_comment_for_issue_ids
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user