title: acts_as_follower issue with following users
body: <p>I have a User model created in devise:</p>
  
  <pre><code>class User &lt; ApplicationRecord
    # Include default devise modules. Others available are:
    # :confirmable, :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :trackable, :validatable
  
    has_one :profile, dependent: :destroy
    after_create :build_profile
  
    acts_as_follower
  
  end
  </code></pre>
  
  <p>Which has an associated <code>profile</code> with the <code>user</code>. And I'm using the <a href="https://github.com/tcocca/acts_as_follower" rel="nofollow noreferrer">acts_as_follower gem</a> to give this model the ability to follow another model.</p>
  
  <p>I want the <code>User</code> to follow a <code>Profile</code>, so i have my profile model set up like this:</p>
  
  <pre><code>class Profile &lt; ApplicationRecord
    belongs_to :user
  
    has_attached_file :avatar, styles: { medium: "300x300&gt;", thumb: "100x100&gt;" }, default_url: "https://s-media-cache-ak0.pinimg.com/564x/f7/61/b3/f761b3ae57801975e0a605e805626279.jpg"
    validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\z/
  
    acts_as_followable
  
  end
  </code></pre>
  
  <p>The Profile model should be followable according to the gem, which is how I have it set up.</p>
  
  <p>I ran the migrations as required <code>rails generate acts_as_follower</code></p>
  
  <p>In my <code>profile_controller</code> iv set up the following methods:</p>
  
  <pre><code>  def follow
      @profile = Profile.find(params[:id])
      current_user.follow(@profile)
      redirect_to :back
    end
  
    def unfollow
      @profile = Profile.find(params[:id]) 
      current_user.stop_following(@profile)
      redirect_to :back
    end
  </code></pre>
  
  <p>And in my <code>route.rb</code> file i have the following:</p>
  
  <pre><code>  resources :profiles do
      member do
        get :follow
        get :unfollow
      end
    end
  </code></pre>
  
  <p>Now in my profiles show view iv set up the button as so:</p>
  
  <pre><code>  &lt;% if !@profile.followed_by?(current_user) %&gt;
      &lt;%= link_to "Follow", follow_profile_path(@profile), class: "btn btn-success btn-outline btn-sm"%&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>According to my knowledge and documentation this should work, but for some reason it does not follow the user or create the association between the <code>user</code> and the <code>profile</code> to follow.</p>