Defect #3014

Journal#save has a wrong signature

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

Status:ClosedStart date:2009-03-19
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:0.8.3
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>

Associated revisions

Revision 2615
Added by Jean-Philippe Lang over 8 years ago

Fixes Journal#save signature (#3014).

History

#1 Updated by Jean-Philippe Lang over 8 years ago

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

Fixed in r2615.

#2 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from Resolved to Closed

Committed in 0.8-stable in r2651.

Also available in: Atom PDF