I’d like to redirect back to the previous page, UNLESS the previous page was my ‘artist’ controller’s ‘show’ action.
So I guess it would look something like:
if *previous page was artist show*
redirect_to [track.artist, track]
else
redirect_to :back
end
My question is – how do I test if the previous page was my artist controller’s show action..?
Perhaps
request.refereris what you’re looking for? Then you can say something like: