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

Version Path
social_stream-0.4.3 app/helpers/activities_helper.rb
social_stream-0.4.2 app/helpers/activities_helper.rb
social_stream-0.4.1 app/helpers/activities_helper.rb
social_stream-0.4.0 app/helpers/activities_helper.rb
social_stream-0.3.6 app/helpers/activities_helper.rb
social_stream-0.3.5 app/helpers/activities_helper.rb
social_stream-0.3.4 app/helpers/activities_helper.rb
social_stream-0.3.3 app/helpers/activities_helper.rb
social_stream-0.3.2 app/helpers/activities_helper.rb
social_stream-0.3.1 app/helpers/activities_helper.rb
social_stream-0.3.0 app/helpers/activities_helper.rb