Sha256: 09f9bfad56d10054397608a95909d386645d55db01772a25d83e307281ff6817

Contents?: true

Size: 326 Bytes

Versions: 9

Compression:

Stored size: 326 Bytes

Contents

module Models
  module Sluggable
    RSpec.shared_examples "a sluggable" do
      it { should validate_presence_of(:slug) }
      it { should validate_uniqueness_of(:slug).case_insensitive }
      it { should have_db_index(:slug).unique(true) }
      it { should validate_length_of(:slug).is_at_most(244) }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
exposition-0.0.5.7.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.5.6.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.5.5.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.5.4.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.5.2.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.5.1.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.5.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.4.pre.alpha spec/support/models/sluggable.rb
exposition-0.0.3.pre.alpha spec/support/models/sluggable.rb