プロジェクト

全般

プロフィール

Vote #64918

完了

Journal#save has a wrong signature

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2009/03/19
期日:
進捗率:

0%

予定工数:
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:
ステータス-->[Closed]

説明

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:in save'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/validations.rb:955:in
update_attribute'


journals

Fixed in r2615.
--------------------------------------------------------------------------------
Committed in 0.8-stable in r2651.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン0.8.3_9 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0