2012-09-14 16:52:24 +02:00
|
|
|
module NotesHelper
|
|
|
|
def loading_more_notes?
|
|
|
|
params[:loading_more].present?
|
|
|
|
end
|
|
|
|
|
|
|
|
def loading_new_notes?
|
|
|
|
params[:loading_new].present?
|
|
|
|
end
|
2012-09-15 11:54:46 +02:00
|
|
|
|
|
|
|
def note_vote_class(note)
|
|
|
|
if note.upvote?
|
|
|
|
"vote upvote"
|
|
|
|
elsif note.downvote?
|
|
|
|
"vote downvote"
|
|
|
|
end
|
|
|
|
end
|
2012-10-09 14:47:42 +02:00
|
|
|
|
|
|
|
def emoji_for_completion
|
|
|
|
# should be an array of strings
|
|
|
|
# so to_s can be called, because it is sufficient and to_json is too slow
|
|
|
|
Emoji::NAMES
|
|
|
|
end
|
2012-09-14 16:52:24 +02:00
|
|
|
end
|