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

Version Path
social_stream-0.2.3 app/helpers/activities_helper.rb
social_stream-0.2.2 app/helpers/activities_helper.rb
social_stream-0.2.1 app/helpers/activities_helper.rb
social_stream-0.2.0 app/helpers/activities_helper.rb
social_stream-0.1.7 app/helpers/activities_helper.rb
social_stream-0.1.6 app/helpers/activities_helper.rb
social_stream-0.1.5 app/helpers/activities_helper.rb
social_stream-0.1.4 app/helpers/activities_helper.rb
social_stream-0.1.3 app/helpers/activities_helper.rb
social_stream-0.1.2 app/helpers/activities_helper.rb
social_stream-0.1.1 app/helpers/activities_helper.rb
social_stream-0.1.0 app/helpers/activities_helper.rb
social_stream-0.0.5 app/helpers/activities_helper.rb