Project

General

Profile

Actions

Defect #3014

closed

Journal#save has a wrong signature

Added by Pierre Paysant-Le Roux over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
2009-03-19
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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'
<pre>

Actions #1

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from New to Resolved
  • Target version set to 0.8.3
  • Resolution set to Fixed

Fixed in r2615.

Actions #2

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from Resolved to Closed

Committed in 0.8-stable in r2651.

Actions

Also available in: Atom PDF