Sha256: b47147a46ded2e97ad5b878c136cf3fd5e0d409d62a2ac7a22c92def17b1957b

Contents?: true

Size: 324 Bytes

Versions: 4

Compression:

Stored size: 324 Bytes

Contents

module ActivitiesHelper

  def like_activity(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

4 entries across 4 versions & 1 rubygems

Version Path
social_stream-0.0.4 app/helpers/activities_helper.rb
social_stream-0.0.3 app/helpers/activities_helper.rb
social_stream-0.0.2 app/helpers/activities_helper.rb
social_stream-0.0.1 app/helpers/activities_helper.rb