myobie-turbine-core 0.3.3 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Photo < PostType
|
2
|
-
fields :photo_url, :caption
|
2
|
+
fields :photo_url, :caption, :url
|
3
3
|
required :photo_url
|
4
4
|
primary :caption
|
5
5
|
|
@@ -15,6 +15,10 @@ class Photo < PostType
|
|
15
15
|
# end#if
|
16
16
|
# end#special
|
17
17
|
|
18
|
+
special :url do |link_content|
|
19
|
+
'http://' + link_content.gsub(/^http:\/\//, '')
|
20
|
+
end
|
21
|
+
|
18
22
|
def self.detect?(text)
|
19
23
|
has_required? text
|
20
24
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Review < PostType
|
2
|
-
fields :rating, :item, :description
|
2
|
+
fields :rating, :item, :description, :url
|
3
3
|
required :rating, :item
|
4
4
|
primary :description
|
5
5
|
heading :item
|
@@ -8,6 +8,10 @@ class Review < PostType
|
|
8
8
|
rating_content.to_f
|
9
9
|
end
|
10
10
|
|
11
|
+
special :url do |link_content|
|
12
|
+
'http://' + link_content.gsub(/^http:\/\//, '')
|
13
|
+
end
|
14
|
+
|
11
15
|
def self.detect?(text)
|
12
16
|
has_required? text
|
13
17
|
end
|