Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
add is_comment_type method
Browse files Browse the repository at this point in the history
  • Loading branch information
mickey committed Dec 6, 2010
1 parent a71d8ce commit 66a32da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/commentable_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def self.find_#{method_name}_by_user(user)
Comment.where(["user_id = ? and commentable_type = ? and role = ?", user.id, commentable, "#{role.to_s}"]).order("created_at DESC")
end
def is_comment_type?(type)
type.to_s == #{role.to_s}
end
def #{method_name}_ordered_by_submitted
Comment.find_comments_for_commentable(self.class.name, id, "#{role.to_s}")
end
Expand Down

0 comments on commit 66a32da

Please sign in to comment.