You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
first of all, thanks for your work, is a nice gem, i'm plaining to use it in several projects im planing.
just playing with it on the console, i find that there are too much querys, heres is an example.
user A invites user B
user B accepts user A invitation
userB.appove(userA)
this method, located at active_record_friend_model (:67) use another method to find if there is a friendship record between these two users "find_any_friendship_with(userA)"
but, under this line, there is another mehod that do the same "invited?(:156)" that also uses "find_any_friendship_with", what about if we just do one query?? maybe the method can just be like this:
Hello,
first of all, thanks for your work, is a nice gem, i'm plaining to use it in several projects im planing.
just playing with it on the console, i find that there are too much querys, heres is an example.
userB.appove(userA)
this method, located at active_record_friend_model (:67) use another method to find if there is a friendship record between these two users "find_any_friendship_with(userA)"
but, under this line, there is another mehod that do the same "invited?(:156)" that also uses "find_any_friendship_with", what about if we just do one query?? maybe the method can just be like this:
i'm new on ruby, maybe i'm missing something....
thanks!!!
The text was updated successfully, but these errors were encountered: