Vote #64918
完了Journal#save has a wrong signature
開始日:
2009/03/19
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
2
version_id:
9
issue_org_id:
3014
author_id:
993
assigned_to_id:
1
comments:
2
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
Journal overrides @save@ method from @ActiveRecord::Base@ like that
def save
...
end
while it should be
def save(perform_validation = true)
...
end
or
def save(*args)
...
end
With current definition, any call passing an argument to the save method - Journal#update_attribute for example - will raise an exception like this one:
wrong number of arguments (1 for 0)
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/validations.rb:955:insave'update_attribute'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/validations.rb:955:in
journals
Fixed in r2615.
--------------------------------------------------------------------------------
Committed in 0.8-stable in r2651.
--------------------------------------------------------------------------------
いいね!0