slugable-joe 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/slugable.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWE2OGZhYmRhY2YxMTAyMzgzZjRjYWUxZGY1NjE0NTQ2MTcyMzYyYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzM5MTczMzdlMWY3OTk2ZGE2MGRmYjI0NmZkOTQyM2FjNTA2M2M3Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTBlZTk0MTQzMTRkMTUyNTliZWZmMWQxMjkzMDAwMGRjZjg1M2M2MTE2MDJj
|
10
|
+
MTNmOTNjMWNkNmE5M2E4MGQxNzhlYjc5MzcxYzYzOWJlNmY4MjY0OWYzN2E2
|
11
|
+
YTZlOTU2ZTk5Y2RiZTRjMGRhMmE3M2NlZTEyMThhMTBlODBmMjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTRhZjYzYzNmMGVhYThhMWEwMTdiYjIxZWQwM2UwYTgyOWVhMGZkMTk2NTQ1
|
14
|
+
YTZiMDVkMDMxZGYzZGM5M2VlYzU3YmMzMmRkZjQ5Yjg2ZWJhOTZkMWZkMDNl
|
15
|
+
NGM4ZTg1MmI1MWQ2OGJlNDZkOGIxZGRkMTMxZDJjNmFjZDEwMzE=
|
data/lib/slugable.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
|
1
|
+
# Note:
|
2
|
+
# This gem requires that you specify the :slug_string using alias_attribute. So, for example, if the slug that you are creating
|
3
|
+
# will be based on the :title in your model, you would need to include the following line of code within the file that is invoking the gem:
|
4
|
+
# alias_attribute :slug_string, :title
|
5
|
+
|
6
|
+
module Slugable
|
2
7
|
def generate_slug
|
3
8
|
if self.errors.empty?
|
4
9
|
#strip the string
|