dg rs; seed bob with facebook friends & fixed invitation view
This commit is contained in:
parent
38a8962945
commit
7b85dcec9c
4 changed files with 19 additions and 17 deletions
|
|
@ -1,10 +1,7 @@
|
|||
-if AppConfig[:open_invitations]
|
||||
- if AppConfig.configured_services.include?('facebook')
|
||||
- if defined? remote
|
||||
= link_to t('.from_facebook'), friend_finder_path('facebook', :remote => remote), :rel => 'facebox'
|
||||
-else
|
||||
= link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox'
|
||||
%br
|
||||
= link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone'), :rel => 'facebox'
|
||||
- else
|
||||
= t('.dont_have_now')
|
||||
- if AppConfig.configured_services.include?('facebook')
|
||||
- if defined? remote
|
||||
= link_to t('.from_facebook'), friend_finder_path('facebook', :remote => remote), :rel => 'facebox'
|
||||
-else
|
||||
= link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox'
|
||||
%br
|
||||
= link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone'), :rel => 'facebox'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
|
||||
- unless AppConfig[:invites_off]
|
||||
- if AppConfig[:open_invitations]
|
||||
.section
|
||||
.title
|
||||
= image_tag('/images/icons/plus.png')
|
||||
|
|
|
|||
10
db/seeds.rb
10
db/seeds.rb
|
|
@ -39,12 +39,10 @@ connect_users(bob, bob.aspects.first, alice, alice.aspects.first)
|
|||
connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
|
||||
puts "done!"
|
||||
|
||||
# Uncomment these and return out of Service::Facebook#save_friends
|
||||
#service = Service.new(:user_id => bob.id)
|
||||
#service.type = "Services::Facebook"
|
||||
#service.access_token = "abc123"
|
||||
#service.save!
|
||||
#su = ServiceUser.create!(:service_id => service.id, :photo_url => "/images/user/angela.jpg", :uid => "abc123", :name => "Angelica")
|
||||
print "Adding Facebook contacts... "
|
||||
facebook = Factory(:service, :type => 'Services::Facebook', :user_id => bob.id)
|
||||
ServiceUser.import((1..10).map{|n| Factory.build(:service_user, :service => facebook) })
|
||||
puts "done!"
|
||||
|
||||
require 'spec/support/fake_resque'
|
||||
require 'spec/support/fake_redis'
|
||||
|
|
|
|||
|
|
@ -105,6 +105,13 @@ Factory.define :service do |service|
|
|||
service.sequence(:access_secret) { |token| "98765#{token}" }
|
||||
end
|
||||
|
||||
Factory.define :service_user do |s_user|
|
||||
s_user.sequence(:uid) { |id| "a#{id}"}
|
||||
s_user.sequence(:name) { |num| "Rob Fergus the #{num.ordinalize}" }
|
||||
s_user.association :service
|
||||
s_user.photo_url "/images/user/adams.jpg"
|
||||
end
|
||||
|
||||
Factory.define(:comment) do |comment|
|
||||
comment.sequence(:text) {|n| "#{n} cats"}
|
||||
comment.association(:author, :factory => :person)
|
||||
|
|
|
|||
Loading…
Reference in a new issue