diff --git a/app/models/person.rb b/app/models/person.rb index 8a6d98e..db2c275 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -601,7 +601,7 @@ class Person < Profile protected def followed_by?(profile) - self == profile || self.is_a_friend?(profile) || self.followers.include(profile) + self == profile || self.is_a_friend?(profile) || self.followers.include?(profile) end end diff --git a/app/views/blocks/profile_info_actions/_person.html.erb b/app/views/blocks/profile_info_actions/_person.html.erb index 4e329d7..3cf9f23 100644 --- a/app/views/blocks/profile_info_actions/_person.html.erb +++ b/app/views/blocks/profile_info_actions/_person.html.erb @@ -11,7 +11,7 @@ <% if profile.follows?(user) %> <%= button(:unfollow, content_tag('span', _('Unfollow')), "#", :class => 'add-friend', :title => _("Unfollow"), :style => 'position: relative;') %> <% else %> - <%= button(:follow, content_tag('span', _('Follow')), "#", :class => 'add-friend', :title => _("Follow"), :style => 'position: relative;') %> + <%= modal_button(:follow, _('Follow'),{ :profile => profile.identifier, :controller => 'followed_people', :action => 'set_category'}, :title => _("Follow"), :style => 'position: relative;') %> <% end %> diff --git a/app/views/followed_people/_profile_list.html.erb b/app/views/followed_people/_profile_list.html.erb index d38a43d..e919c12 100644 --- a/app/views/followed_people/_profile_list.html.erb +++ b/app/views/followed_people/_profile_list.html.erb @@ -3,6 +3,9 @@