<% # Clients of this partial must supply the following variable: # comment_commontable_thread %> <% subscription = comment_commontable_thread.is_subscribed?(@user) <% sub_string = subscription ? "unsubscribe" : "subscribe" %> <%= link_to sub_string.capitalize, polymorphic_path([sub_string, commontable, :comments]), :confirm => (subscription ? \ "Are you sure you want to unsubscribe from ' + commontable_name(comment_commontable_thread) + '?\n" : \ nil), :remote => true %>