🚨Fix Rubocop lint errors

This commit is contained in:
Pranav Raj S
2019-10-20 14:17:26 +05:30
committed by GitHub
parent dd018f3682
commit 94c6d6db6f
124 changed files with 774 additions and 914 deletions

View File

@@ -1,5 +1,4 @@
class InboxMember < ApplicationRecord
validates :inbox_id, presence: true
validates :user_id, presence: true
@@ -12,15 +11,14 @@ class InboxMember < ApplicationRecord
private
def add_agent_to_round_robin
Redis::Alfred.lpush(round_robin_key, self.user_id)
Redis::Alfred.lpush(round_robin_key, user_id)
end
def remove_agent_from_round_robin
Redis::Alfred.lrem(round_robin_key, self.user_id)
Redis::Alfred.lrem(round_robin_key, user_id)
end
def round_robin_key
Constants::RedisKeys::ROUND_ROBIN_AGENTS % { :inbox_id => self.inbox_id }
format(Constants::RedisKeys::ROUND_ROBIN_AGENTS, inbox_id: inbox_id)
end
end