Sha256: e4137b29dc37bf2f8958061d8c123166719af86ad119c89a6711ee226395367c

Contents?: true

Size: 279 Bytes

Versions: 2

Compression:

Stored size: 279 Bytes

Contents

class Gutentag::TagValidations
  def self.call(klass)
    new(klass).call
  end

  def initialize(klass)
    @klass = klass
  end

  def call
    klass.validates :name, :presence => true,
      :uniqueness => {:case_sensitive => false}
  end

  private

  attr_reader :klass
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gutentag-0.9.0 lib/gutentag/tag_validations.rb
gutentag-0.8.0 lib/gutentag/tag_validations.rb