myobie-turbine-core 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/lib/turbine-core/post_type.rb +4 -4
- metadata +1 -1
data/VERSION.yml
CHANGED
@@ -259,8 +259,8 @@ class PostType
|
|
259
259
|
|
260
260
|
eval_specials # this won't be needed once the set_attr takes care of it
|
261
261
|
eval_defaults # this won't be needed once the get_attr takes care of it
|
262
|
-
parse_tags
|
263
|
-
generate_slug
|
262
|
+
parse_tags # TODO: parse_tags needs to be turned into a special block
|
263
|
+
generate_slug # TODO: generate_slug should be turned into a default block
|
264
264
|
end
|
265
265
|
|
266
266
|
def commit_hash(pairs_hash)
|
@@ -292,7 +292,7 @@ class PostType
|
|
292
292
|
end
|
293
293
|
|
294
294
|
def parse_tags
|
295
|
-
if get_attr(:tags).class == String
|
295
|
+
if get_attr?(:tags) && get_attr(:tags).class == String
|
296
296
|
tags_array = get_attr(:tags).split(',').collect { |t| t.strip }
|
297
297
|
set_attr(:tags, tags_array)
|
298
298
|
end
|
@@ -339,7 +339,7 @@ class PostType
|
|
339
339
|
result.slugify!
|
340
340
|
end#of unless
|
341
341
|
|
342
|
-
if result.blank?
|
342
|
+
if result.blank? || !slug_is_unique
|
343
343
|
result = uuid
|
344
344
|
end
|
345
345
|
|