Sha256: a68e320423c194160d80d0d6272bba32a382faf22b9b4031186f990b797f4e86

Contents?: true

Size: 644 Bytes

Versions: 2

Compression:

Stored size: 644 Bytes

Contents

<% # Clients of this partial must supply the following variable:
   # thread
   # user
%>

<% is_subscribed = thread.is_subscribed?(user) %>
<% sub_string = is_subscribed ? "unsubscribe" : "subscribe" %>
<%= link_to sub_string.capitalize,
            commontator.polymorphic_path([sub_string, thread]),
            :confirm => (is_subscribed ? \
                          "Are you sure you want to unsubscribe from this thread?" : \
                          nil),
            :method => :patch,
            :id => "thread_#{thread.id.to_s}_#{sub_string}_link",
            :class => "thread_#{sub_string}_link",
            :remote => true %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
commontator-4.0.1 app/views/commontator/subscriptions/_link.html.erb
commontator-4.0.0 app/views/commontator/subscriptions/_link.html.erb