Sha256: 830a9f4b7310f7e07f36cf5fef1f171e11fc38a701166c32de4cd34fcd4c86b5

Contents?: true

Size: 338 Bytes

Versions: 2

Compression:

Stored size: 338 Bytes

Contents

class MultiattributeTestClass < ActiveRecord::Base
  include UniqueAttributes
  unique_attribute :autogenerated_username, proc { generate_username }
  unique_attribute :autogenerated_password, proc { generate_password }

  def self.generate_username
    SecureRandom.hex
  end

  def self.generate_password
    SecureRandom.hex
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
unique_attributes-0.1.2 spec/support/multiattribute_test_class.rb
unique_attributes-0.1.0 spec/support/multiattribute_test_class.rb