I'm trying to transfer the ownership of a project and repository belonging
to someone whose account has been disabled. Since the account is disabled
I'm trying to use the ruby console to transfer ownership, but I'm getting a
NoMethodError using the methods defined on these models. I'm new to
ruby/rails so it's possible I'm overlooking something fairly obvious, but
here's what I'm doing:
% env RAILS_ENV=production ruby script/console
>> user = User.find_by_login('username')
=> #<User id: 23, ...>
>> proj = Project.find_by_slug('foo-project)
=> #<Project id: 121, ...>
>> proj.change_owner_to user
NoMethodError: undefined method `change_owner_to' for
#<Project:0x7f8ad0202da0>
from
/var/www/gitorious/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:260:in
`method_missing'
from (irb):32
What am I missing here? Is there a better way to do this? I'm using
gitorious v2.1.1.
Thanks,
Allan
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]