Sha256: 6509a2c8f04673d9753a23885ce4269ac26d545103d0a55cc2a211c8515f38aa
Contents?: true
Size: 460 Bytes
Versions: 13
Compression:
Stored size: 460 Bytes
Contents
module ActivitiesHelper # Link to 'like' or 'unlike' depending on the like status of the activity to current_user # # @param [Activity] # @return [String] def link_like(activity) if (activity.liked_by?(current_user)) 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
13 entries across 13 versions & 1 rubygems