So I was trying to display some font-awesome icons, when a favorite is true or either false.
I had something similar like below:
Application Controller
def favorite_text
@favorite_exists ? '<i class="fas fa-heart"></i>' : '<i class="fas fa-heart-o"</i>'
end
helper_method :favorite_text
And in the view:
<%= link_to favorite_text, update_favorites_path, remote: true %>