DB seeds now use friending, presidents are not friends.

This commit is contained in:
Raphael 2010-07-14 12:41:22 -07:00
parent c82f41e740
commit 4bd50d47b7
2 changed files with 6 additions and 3 deletions

View file

@ -54,7 +54,5 @@ names = [ ["George", "Washington"],
#email = names[n][1].gsub(/ /,'').downcase #email = names[n][1].gsub(/ /,'').downcase
#Person.create( :email => "#{email}@joindiaspora.com", :url => "http://#{email}.joindiaspora.com/", :active => true, :profile => Profile.new(:first_name => names[n][0], :last_name => names[n][1])) #Person.create( :email => "#{email}@joindiaspora.com", :url => "http://#{email}.joindiaspora.com/", :active => true, :profile => Profile.new(:first_name => names[n][0], :last_name => names[n][1]))
#} #}
Request.all.each{|r|
User.owner.accept_friend_request(r.id)
}

View file

@ -18,6 +18,11 @@ namespace :db do
end end
end end
task :accept_requests do
puts "Accepting all friend requests for #{Rails.env}"
require 'db/seeds/accept'
end
desc 'Delete the collections in the current RAILS_ENV database' desc 'Delete the collections in the current RAILS_ENV database'
task :purge do task :purge do
require 'config/environment' require 'config/environment'