vrfs-774: added check for @user_counters in is_{liker,friend,follower}; change M_PER_PAGE to 10

This commit is contained in:
Jonathan Kolyer 2013-11-15 13:52:53 -06:00
parent ac2d4770f5
commit 7be8435dc7
1 changed files with 5 additions and 5 deletions

View File

@ -85,7 +85,7 @@ module JamRuby
PARAM_MUSICIAN = :search_m
M_PER_PAGE = 6
M_PER_PAGE = 10
M_ORDER_FOLLOWS = ['Most Followed', :followed]
M_ORDER_PLAYS = ['Most Plays', :plays]
@ -199,7 +199,7 @@ module JamRuby
def _count(musician, key)
if mm = @user_counters[musician.id]
return mm.detect { |ii| ii.is_a?(Hash) }[key]
end
end if @user_counters
0
end
@ -222,19 +222,19 @@ module JamRuby
def is_friend?(musician)
if mm = @user_counters[musician.id]
return mm.include?(RESULT_FRIEND)
end
end if @user_counters
false
end
def is_follower?(musician)
if mm = @user_counters[musician.id]
return mm.include?(RESULT_FOLLOW)
end
end if @user_counters
false
end
def is_liker?(musician)
if mm = @user_counters[musician.id]
return mm.include?(RESULT_LIKE)
end
end if @user_counters
false
end