title: rails - redirect back unless previous page was artist page
body: <p>I'd like to redirect back to the previous page, UNLESS the previous page was my 'artist' controller's 'show' action.</p>
  
  <p>So I guess it would look something like:</p>
  
  <pre><code>if *previous page was artist show*
    redirect_to [track.artist, track]
  else
    redirect_to :back
  end
  </code></pre>
  
  <p>My question is - how do I test if the previous page was my artist controller's show action..?</p>