effective_classifieds 0.6.3 → 0.6.4

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
  SHA256:
3
- metadata.gz: 9f50ce82294a1f8cacc7770a7ed0c016b9cfaf167e5503b77811909ac0f50e8b
4
- data.tar.gz: 388ea2f75b8dbedeaf6c5e2e647dcb7e89ac6557f7d4e577e69e68388c5199c6
3
+ metadata.gz: 183d1cca51d40fd8a279c5c8ce2bd4b773237a7f40eb1fb3db1ae05a064d696d
4
+ data.tar.gz: 31d829481849ca92070b96f8df55c171718cd62a63ba5504aa0c4fef46a2c0ff
5
5
  SHA512:
6
- metadata.gz: 5d4e9750e5f9283bc579338d05e302ef4f4aadbbb7fedcc3b0b2a7edc34b58056a7b57962d4384f4c9ffa31c7a82cd1f68a00b589328e7ddfaf34787c96af6f1
7
- data.tar.gz: f80d8138623f819eeb2ace8b51cc6f947ffde862263cdd459ef525227987ab3881e29f9bf114f0caafc3cab2d7b4503e6a85db933e31014e870fe8a9a825b409
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
- format.js { render('show', formats: :js) }
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.6.3'.freeze
2
+ VERSION = '0.6.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_classifieds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect