Sha256: e92cc4454af1121bb71f7eaf6f9a6e30a7788556af0d90f2ba53a01821130e26

Contents?: true

Size: 282 Bytes

Versions: 2

Compression:

Stored size: 282 Bytes

Contents

class Course
  extend ActiveModel::Callbacks
  include ActiveModel::Validations
  include UniqNumberId

  define_model_callbacks :create
  attr_accessor :course_code
  uniq_number_id :course_code, length: 10

  def self.exists?(attrs)
    false
  end

  def save
    true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uniq_number_id-0.0.2 spec/models/course.rb
uniq_number_id-0.0.1 spec/models/course.rb