Commit d45e25860effdfa9a83db963aaa75def1f735f18
1 parent
aa37360c
Fixes reverted commit, adds new sti table and makes it a follower
Showing
6 changed files
with
19 additions
and
27 deletions
Show diff stats
app/models/concerns/follower.rb
... | ... | @@ -2,22 +2,12 @@ module Follower |
2 | 2 | extend ActiveSupport::Concern |
3 | 3 | |
4 | 4 | def follow(profile, circles) |
5 | - puts "follow..." | |
6 | 5 | circles = [circles] unless circles.is_a?(Array) |
7 | 6 | circles.each do |new_circle| |
8 | -<<<<<<< HEAD | |
9 | 7 | next if new_circle.owner != self || !profile.kind_of?(new_circle.profile_type.constantize) |
10 | -======= | |
11 | - puts "seguindo alguen..." | |
12 | - puts "profile_type: #{new_circle.profile_type}, class_name: #{profile.class.name}" | |
13 | - puts "new_circle.person: #{new_circle.person}, self: #{self}" | |
14 | 8 | if (new_circle.person != self && !(self.kind_of?(new_circle.person.class)) || new_circle.profile_type != profile.class.name) |
15 | 9 | next |
16 | 10 | end |
17 | - puts '*20'*20 | |
18 | - puts "CHEGOU NO PROFILE FOLLOWER" | |
19 | - puts '*20'*20 | |
20 | ->>>>>>> parent of bfbd548... Revert "Adds new ExternalProfile module and refactor ExternalPerson" | |
21 | 11 | ProfileFollower.create(profile: profile, circle: new_circle) |
22 | 12 | end |
23 | 13 | end | ... | ... |
app/models/external_person.rb
... | ... | @@ -3,15 +3,11 @@ class ExternalPerson < ExternalProfile |
3 | 3 | |
4 | 4 | include Human |
5 | 5 | include ProfileEntity |
6 | -<<<<<<< HEAD | |
7 | 6 | include Follower |
8 | - include Followable | |
9 | 7 | |
10 | 8 | has_many :profile_followers, :as => :profile |
11 | 9 | has_many :circles, :through => :profile_followers |
12 | 10 | has_many :owned_circles, as: :owner, :class_name => "Circle" |
13 | -======= | |
14 | ->>>>>>> parent of bfbd548... Revert "Adds new ExternalProfile module and refactor ExternalPerson" | |
15 | 11 | |
16 | 12 | validates_uniqueness_of :identifier, scope: :source |
17 | 13 | |
... | ... | @@ -138,7 +134,6 @@ class ExternalPerson < ExternalProfile |
138 | 134 | } |
139 | 135 | end |
140 | 136 | |
141 | -<<<<<<< HEAD | |
142 | 137 | # External Person should respond to all methods in Person and Profile |
143 | 138 | def person_instance_methods |
144 | 139 | methods_and_responses = { |
... | ... | @@ -272,6 +267,4 @@ class ExternalPerson < ExternalProfile |
272 | 267 | end |
273 | 268 | derivated_methods |
274 | 269 | end |
275 | -======= | |
276 | ->>>>>>> parent of bfbd548... Revert "Adds new ExternalProfile module and refactor ExternalPerson" | |
277 | 270 | end | ... | ... |
app/models/external_profile.rb
db/migrate/20160822110424_rename_external_people_to_external_profiles.rb
db/migrate/20160829170524_rename_external_people_to_external_profiles.rb
0 → 100644
db/migrate/20160829185118_add_type_to_external_profile.rb
0 → 100644