Created
November 16, 2011 11:08
-
-
Save jhass/1369842 to your computer and use it in GitHub Desktop.
Add all followers to an aspect, edit and save under script/follow_all.rb, run with bundle exec ruby ./script/follow_all.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
user_id = 0 # your user id | |
aspect_name = "Work" # Name of the aspect followers should be added to | |
require File.join(File.dirname(File.expand_path(__FILE__)), '..', 'config', 'environment') | |
user = User.find(user_id) | |
aspect = user.aspects.where(:name => aspect_name).first | |
user.contacts.only_sharing.each do |contact| | |
begin | |
user.share_with(contact.person, aspect) | |
rescue | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment