Skip to content

Commit

Permalink
Several fixes in activities
Browse files Browse the repository at this point in the history
  • Loading branch information
atd committed Sep 16, 2010
1 parent f46199b commit 6ee182f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Activity < ActiveRecord::Base
:dependent => :destroy

belongs_to :activity_verb
has_many :activity_object_activities
has_many :activity_object_activities, :dependent => :destroy
has_many :activity_objects, :through => :activity_object_activities

belongs_to :tie,
Expand Down Expand Up @@ -49,7 +49,7 @@ def liked_by(user) #:nodoc:

# Does user like this activity?
def liked_by?(user)
liked_by(user).any?
liked_by(user).present?
end

class << self
Expand Down
2 changes: 1 addition & 1 deletion lib/action_controller/subactivity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def activity!
end

def tie
@tie ||= current_user.ties(:receiver => activity!.author,
@tie ||= current_user.ties(:receiver => activity!.receiver,
:relation => activity!.relation).first
end

Expand Down

0 comments on commit 6ee182f

Please sign in to comment.