title: Checking if a Spotify user follows an artist
body: <p>I am creating a rails app that checks whether a user follows an artist on spotify. I have the following code to check if this is the case.</p>
  
  <pre><code>def personalise(acts) 
      acts_with_rank = acts.collect{|act|{:value =&gt; rank(act), :label =&gt; act.name}}
  end
  
  def rank(act)
      spotify_user = RSpotify::User.new(request.env['omniauth.auth'])
      artist = RSpotify::Artist.search(act.name).first
      binding.remote_pry
          if spotify_user.follows?(artist)
              10
          else
              0
          end
  end
  </code></pre>
  
  <p>The problem is, every act ends up with 10 as its value in the hash, regardless of whether or not the user is actually following the artist. I am using remote-pry to check whether or not true or false is returned for each iteration of the if statement, and although it is correctly returning true or false depending on whether or not the user is following the artist, something else seems to make the if statements return 0. Any help would be appreciated on this as I'm sure I'm just looking at this for too long and can't see something stupid that I've done!</p>