Sha256: a5613bab74cf93bd32493e30074908a2445e76b89503d02a6eccc3ba30c21c11
Contents?: true
Size: 466 Bytes
Versions: 11
Compression:
Stored size: 466 Bytes
Contents
module ActivitiesHelper # Link to 'like' or 'unlike' depending on the like status of the activity to current_subject # # @param [Activity] # @return [String] def link_like(activity) if (activity.liked_by?(current_subject)) link_to t('activity.unlike'), activity_like_path(activity), :method => :delete, :remote => true else link_to t('activity.like'), activity_like_path(activity), :method => :post, :remote => true end end end
Version data entries
11 entries across 11 versions & 1 rubygems