ecm_blog 0.0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0368f6ac69e1091e9973f636ce90fa2f73b9bcb2'
|
4
|
+
data.tar.gz: f6af4fe970680805abbab77b6db19ed7b6e2817e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48cde31153845aa0503d801b22e802ce0c636b61c6184315e2418c6458cff322733a0ae5b4bdb4febe586db9088869d9d4da543f9ec6fe60dc78d0daa21349c8
|
7
|
+
data.tar.gz: 18c640b24e82eeeb45f9df0570834759794a07f441018f90d7d6950c4f8aa07b4fdc528395d5783a6aeda45600badaab2005f126b7585bbf8d179f87646cf45f
|
@@ -15,7 +15,7 @@ module Ecm
|
|
15
15
|
private
|
16
16
|
|
17
17
|
def collection_scope
|
18
|
-
super.published.order(updated_at: :desc)
|
18
|
+
super.published.friendly.order(updated_at: :desc)
|
19
19
|
end
|
20
20
|
|
21
21
|
def load_collection
|
@@ -23,7 +23,7 @@ module Ecm
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def load_scope
|
26
|
-
super.published
|
26
|
+
super.published.friendly
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/app/models/ecm/blog/post.rb
CHANGED
@@ -8,6 +8,10 @@ module Ecm::Blog
|
|
8
8
|
include ActsAsPublished::ActiveRecord
|
9
9
|
acts_as_published
|
10
10
|
|
11
|
+
# slugs
|
12
|
+
extend FriendlyId
|
13
|
+
friendly_id :title, use: :slugged
|
14
|
+
|
11
15
|
belongs_to :creator, class_name: Ecm::Blog.creator_class_name, foreign_key: 'created_by_id'
|
12
16
|
belongs_to :updater, class_name: Ecm::Blog.creator_class_name, foreign_key: 'updated_by_id', optional: true
|
13
17
|
|
@@ -16,7 +20,7 @@ module Ecm::Blog
|
|
16
20
|
end
|
17
21
|
|
18
22
|
module Markdown
|
19
|
-
def body(format:
|
23
|
+
def body(format: nil)
|
20
24
|
case format
|
21
25
|
when :html
|
22
26
|
to_markdown(read_attribute(:body))
|
data/lib/ecm/blog/version.rb
CHANGED
data/lib/ecm_blog.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: friendly_id
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Ecm::Blog Module.
|
70
84
|
email:
|
71
85
|
- roberto@vasquez-angel.de
|