class ValidatesDuplicityOf::Callback

Attributes

attr_name[R]
scope[R]

Public Class Methods

new(attr_name, scope) click to toggle source
# File lib/validates_duplicity_of/callback.rb, line 5
def initialize(attr_name, scope)
  @attr_name = attr_name
  @scope = scope
end

Public Instance Methods

before_save(record) click to toggle source
# File lib/validates_duplicity_of/callback.rb, line 10
def before_save(record)
  duplicator = Duplicator.new self, record
  duplicator.validate
end