effective_classifieds 0.6.3 → 0.6.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 513b026eaa5383f76e9245c493e80db4e046a1a27b066bdfd53dea5c569df640
|
4
|
+
data.tar.gz: fbbc24393ec5435358133a9c94c36de7123ac225660ad2325d5fb8aeae7123f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98985dcaca1f4f735ef3a6fcb7308bd990b70c109a298d560ca33bb1d3ff186e7ad3e4e543906f9641d047a2e83e6a3481fd5f7ab3c39765bf5461b2a7faed3e
|
7
|
+
data.tar.gz: 4e17489e7d1d7e80dab1ccb823573bd58406c95bc808978478976dbfca52145cd5ab1e6038dee3e2de55f1aafa3008d5881cb8f0c3879f4472d256a91256dbea
|
@@ -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
|
@@ -9,7 +9,7 @@ module EffectiveClassifieds
|
|
9
9
|
|
10
10
|
# Include acts_as_addressable concern and allow any ActiveRecord object to call it
|
11
11
|
initializer 'effective_classifieds.active_record' do |app|
|
12
|
-
|
12
|
+
app.config.to_prepare do
|
13
13
|
ActiveRecord::Base.extend(EffectiveClassifiedsClassifiedWizard::Base)
|
14
14
|
end
|
15
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_classifieds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|