slug 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/slug/slug.rb +2 -2
- data/slug.gemspec +2 -2
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/slug/slug.rb
CHANGED
@@ -20,9 +20,9 @@ module Slug
|
|
20
20
|
|
21
21
|
self.slug_column = opts.has_key?(:column) ? opts[:column] : :slug
|
22
22
|
|
23
|
-
validates_presence_of self.slug_column, :message => "
|
23
|
+
validates_presence_of self.slug_column, :message => "cannot be blank. Is #{self.slug_source} sluggable?"
|
24
24
|
validates_uniqueness_of self.slug_column
|
25
|
-
validates_format_of self.slug_column, :with => /^[a-z0-9-]
|
25
|
+
validates_format_of self.slug_column, :with => /^[a-z0-9-]+$/, :message => "contains invalid characters. Only downcase letters, numbers, and '-' are allowed."
|
26
26
|
before_validation_on_create :set_slug
|
27
27
|
end
|
28
28
|
end
|
data/slug.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{slug}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben Koski"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-30}
|
13
13
|
s.description = %q{Simple, straightforward slugs for your ActiveRecord models.}
|
14
14
|
s.email = %q{ben.koski@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Koski
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-30 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|