effective_classifieds 0.2.0 → 0.2.1
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: b86483009f7d9be8e80a451b7b957bbfe1ac9ec2d88d7a11e13f36a97a261a6e
|
|
4
|
+
data.tar.gz: bd9cd48a34bd463f87c12cb3353f9a474f4de95645c4999f9188d10fd2f52d76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 820fd500352d1a4b20cc7ed71f0f9569a25d27ca3d2e6a91befc4d8ccfc3244d882e77dcdbb240e73634b419fb90b5b7abfe0ce5abf09d63c11945f90f690f57
|
|
7
|
+
data.tar.gz: 5f2c5ea34d257e972c9f3f2e4e30216537a3f899a8c4778af8c578485653b0d134f6e7c4e44146c456efd2cd7cdde55f85e87f5f96b0c0c972ca37c75d6cb924
|
|
@@ -6,26 +6,5 @@ module Effective
|
|
|
6
6
|
|
|
7
7
|
resource_scope -> { EffectiveClassifieds.ClassifiedWizard.deep.where(owner: current_user) }
|
|
8
8
|
|
|
9
|
-
# Allow only 1 in-progress application at a time
|
|
10
|
-
before_action(only: [:new, :show], unless: -> { resource&.done? }) do
|
|
11
|
-
existing = resource_scope.in_progress.where.not(id: resource).first
|
|
12
|
-
|
|
13
|
-
if existing.present?
|
|
14
|
-
flash[:success] = "You have been redirected to your in-progress classified ad submission"
|
|
15
|
-
redirect_to effective_classifieds.classified_wizard_build_path(existing, existing.next_step)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
after_save do
|
|
20
|
-
flash.now[:success] = ''
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
private
|
|
24
|
-
|
|
25
|
-
def permitted_params
|
|
26
|
-
model = (params.key?(:effective_classified_wizard) ? :effective_classified_wizard : :classified_wizard)
|
|
27
|
-
params.require(model).permit!.except(:status, :status_steps, :wizard_steps, :submitted_at)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
9
|
end
|
|
31
10
|
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.2.
|
|
4
|
+
version: 0.2.1
|
|
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: 2022-01-
|
|
11
|
+
date: 2022-01-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|