ems 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/ems/article.rb +8 -8
- data/app/models/ems/news.rb +8 -8
- data/app/models/ems/report.rb +8 -8
- data/lib/ems/version.rb +1 -1
- metadata +1 -1
data/app/models/ems/article.rb
CHANGED
@@ -21,14 +21,14 @@ module Ems
|
|
21
21
|
validates_inclusion_of :status, :in => [ :draft, :pending, :live ], :message => "Value is not a valid status"
|
22
22
|
|
23
23
|
|
24
|
-
searchable do
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
24
|
+
# searchable do
|
25
|
+
# text :title, :stored => true
|
26
|
+
# text :standfirst, :stored => true
|
27
|
+
# text :content, :stored => true, :more_like_this => true do
|
28
|
+
# Sanitize.clean self.content_as_html
|
29
|
+
# end
|
30
|
+
# integer :category_id, :references => Category
|
31
|
+
# end
|
32
32
|
|
33
33
|
# after methods
|
34
34
|
after_initialize :init
|
data/app/models/ems/news.rb
CHANGED
@@ -4,14 +4,14 @@ module Ems
|
|
4
4
|
extend FriendlyId
|
5
5
|
friendly_id :title, use: :slugged
|
6
6
|
|
7
|
-
searchable do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
7
|
+
# searchable do
|
8
|
+
# text :title, :stored => true
|
9
|
+
# text :standfirst, :stored => true
|
10
|
+
# text :content, :stored => true, :more_like_this => true do
|
11
|
+
# Sanitize.clean self.content_as_html
|
12
|
+
# end
|
13
|
+
# integer :category_id, :references => Category
|
14
|
+
# end
|
15
15
|
|
16
16
|
# after methods
|
17
17
|
after_initialize :init
|
data/app/models/ems/report.rb
CHANGED
@@ -4,14 +4,14 @@ module Ems
|
|
4
4
|
extend FriendlyId
|
5
5
|
friendly_id :title, use: :slugged
|
6
6
|
|
7
|
-
searchable do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
7
|
+
# searchable do
|
8
|
+
# text :title, :stored => true
|
9
|
+
# text :standfirst, :stored => true
|
10
|
+
# text :content, :stored => true, :more_like_this => true do
|
11
|
+
# Sanitize.clean self.content_as_html
|
12
|
+
# end
|
13
|
+
# integer :category_id, :references => Category
|
14
|
+
# end
|
15
15
|
|
16
16
|
# after methods
|
17
17
|
after_initialize :init
|
data/lib/ems/version.rb
CHANGED