Do not allow more than 4 simultaneous EPP connections

This commit is contained in:
Martin Lensment 2015-05-20 20:41:53 +03:00
parent b39c3ab262
commit 6a63c258f6
5 changed files with 25 additions and 4 deletions

View file

@ -1,8 +1,9 @@
class EppSession < ActiveRecord::Base
before_save :marshal_data!
belongs_to :registrar
# rubocop: disable Rails/ReadWriteAttribute
# Turned back to read_attribute, thus in Rails 4
# Turned back to read_attribute, thus in Rails 4
# there is differences between self[:data] and read_attribute.
def data
@data ||= self.class.unmarshal(read_attribute(:data)) || {}