effective_classifieds 0.6.3 → 0.6.4
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 183d1cca51d40fd8a279c5c8ce2bd4b773237a7f40eb1fb3db1ae05a064d696d
|
|
4
|
+
data.tar.gz: 31d829481849ca92070b96f8df55c171718cd62a63ba5504aa0c4fef46a2c0ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b37cfdae9fa2fcba722e07d8635287f9f2a051af9a90baeb3bce10899d8230c4099bee53380873f710b44d1656a3d7862d96c605aabcfbf6c570fbd68c13a6fa
|
|
7
|
+
data.tar.gz: ffbcdce66f4e9923603d343808b5feea1d4d9484749fe43768f3d0bd5fdc5c9f432826fdc0933747127666e22ff2a36775313ff53783c9ebb8b8c07713e22025
|
|
@@ -31,7 +31,11 @@ module Effective
|
|
|
31
31
|
|
|
32
32
|
respond_to do |format|
|
|
33
33
|
format.html { }
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
format.json {
|
|
36
|
+
url = effective_classifieds.classified_url(@classified, format: :json)
|
|
37
|
+
render(json: @classified.for_json.merge(url: url).to_json)
|
|
38
|
+
}
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
end
|
|
@@ -154,6 +154,10 @@ module Effective
|
|
|
154
154
|
title.presence || model_name.human
|
|
155
155
|
end
|
|
156
156
|
|
|
157
|
+
def for_json
|
|
158
|
+
{ id: id, title: title, body: body.to_s, created_at: created_at, updated_at: updated_at }
|
|
159
|
+
end
|
|
160
|
+
|
|
157
161
|
def purchasable_name
|
|
158
162
|
"#{category} - #{title}"
|
|
159
163
|
end
|