mattvanhorn/BJJLife

View on GitHub
lib/validators/custom_validator.rb

Summary

Maintainability
A
0 mins
Test Coverage
class CustomValidator < ActiveModel::Validator

  def validate(obj)
    set_record obj
  end

  private

  def set_record(obj)
    @record = obj
    @errors = @record.errors
  end

end