title: Check if user voted acts as votable
body: <p>I want to make some styling changes if user has voted for a photo, and I used this code (acts_as_votable docs):</p>
  
  <pre><code>  &lt;% if current_user.voted_for? @photo %&gt;
      &lt;%= link_to like_photo_path(@photo), method: :put do %&gt;
          &lt;button&gt;
          ¡Liked!
          &lt;/button&gt;
      &lt;% end %&gt;
    &lt;% else %&gt;
      You dont like it yet
    &lt;% end %&gt;
  </code></pre>
  
  <p>But this wont work because it will show "Liked" all the time, even if I didn't click the Like button.</p>
  
  <p><strong>photos controller</strong></p>
  
  <pre><code>def upvote
      @photo = Photo.friendly.find(params[:id])
      @photo.liked_by current_user
      redirect_to user_photo_path(@photo.user,@photo)
  end
  </code></pre>
  
  <p>What can it be wrong?</p>