Defect #6917
respond_to_without_attributes? does not work from runner
Status: | New | Start date: | 2010-11-16 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Resolution: | Affected version: |
Description
If have written a script that is executed with the ruby on rails runner. This script requires all repositories (which can be hg, svn or git in my setup). When a iterate over all repositories it gives an exception on the first git repository. This occurs because respond_to_without_attributes? is not defined on git instances. This only occurs in the runner, not in the a plugin.
I can work around this by wrapping lines 1652 to 1660 with
if object.respond_to? :respond_to_without_attributes?
The side-effect of this workaround is that the type of the git repository objects is not Repository::Git such as Repository::Mercurial but just Git.
History
#1
Updated by Bart Vanbrabant about 12 years ago
Sorry. The version is 1.0.2 and this file I mentioned is vendor/rails/activerecord/lib/active_record/base.rb