effective_polls 0.1.0 → 0.1.1
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: 564dabc8a5490be5d5ebf050a0b4e718b69781dcc9b7d585e8644546f54288cd
|
4
|
+
data.tar.gz: 1503bc14d59cc2e1b1d7a9938065b5ac687eb8b81defcc594fc95b74b7284009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 811446095aa021a4eed57a83047f79debbdab3c931184ff748c6c36181202691d7a5c845b4b5c364a984b5785d9f661d8ca56268eec807c5c6cf95905d250e2d
|
7
|
+
data.tar.gz: 8e5e682feb705f6a4891b734610fac4c6e5a90ae897119f04c63c28bf32ea2479fb041ca8653bf32876974bb52dd8c72cdebf7e8d29fe47ba1230572ebef9cbd
|
@@ -11,11 +11,11 @@ module Effective
|
|
11
11
|
CATEGORIES = [
|
12
12
|
'Choose one', # Radios
|
13
13
|
'Select all that apply', # Checks
|
14
|
-
'Select
|
15
|
-
'Select
|
16
|
-
'Select
|
17
|
-
'Select
|
18
|
-
'Select
|
14
|
+
'Select up to 1',
|
15
|
+
'Select up to 2',
|
16
|
+
'Select up to 3',
|
17
|
+
'Select up to 4',
|
18
|
+
'Select up to 5',
|
19
19
|
'Date', # Date Field
|
20
20
|
'Email', # Email Field
|
21
21
|
'Number', # Numeric Field
|
@@ -27,11 +27,11 @@ module Effective
|
|
27
27
|
WITH_OPTIONS_CATEGORIES = [
|
28
28
|
'Choose one', # Radios
|
29
29
|
'Select all that apply', # Checks
|
30
|
-
'Select
|
31
|
-
'Select
|
32
|
-
'Select
|
33
|
-
'Select
|
34
|
-
'Select
|
30
|
+
'Select up to 1',
|
31
|
+
'Select up to 2',
|
32
|
+
'Select up to 3',
|
33
|
+
'Select up to 4',
|
34
|
+
'Select up to 5'
|
35
35
|
]
|
36
36
|
|
37
37
|
effective_resource do
|
@@ -22,35 +22,35 @@
|
|
22
22
|
%h5 Select all that apply
|
23
23
|
%p Display checkboxes to select all options that apply
|
24
24
|
|
25
|
-
= f.show_if :category, 'Select
|
25
|
+
= f.show_if :category, 'Select up to 1' do
|
26
26
|
.card
|
27
27
|
.card-body
|
28
|
-
%h5 Select
|
29
|
-
%p Display checkboxes to select
|
28
|
+
%h5 Select up to 1 (one)
|
29
|
+
%p Display checkboxes to select up to 1 option
|
30
30
|
|
31
|
-
= f.show_if :category, 'Select
|
31
|
+
= f.show_if :category, 'Select up to 2' do
|
32
32
|
.card
|
33
33
|
.card-body
|
34
|
-
%h5 Select
|
35
|
-
%p Display checkboxes to select
|
34
|
+
%h5 Select up to 2 (two)
|
35
|
+
%p Display checkboxes to select up to 2 options
|
36
36
|
|
37
|
-
= f.show_if :category, 'Select
|
37
|
+
= f.show_if :category, 'Select up to 3' do
|
38
38
|
.card
|
39
39
|
.card-body
|
40
|
-
%h5 Select
|
41
|
-
%p Display checkboxes to select
|
40
|
+
%h5 Select up to 3 (three)
|
41
|
+
%p Display checkboxes to select up to 3 options
|
42
42
|
|
43
|
-
= f.show_if :category, 'Select
|
43
|
+
= f.show_if :category, 'Select up to 4' do
|
44
44
|
.card
|
45
45
|
.card-body
|
46
|
-
%h5 Select
|
47
|
-
%p Display checkboxes to select
|
46
|
+
%h5 Select up to 4 (four)
|
47
|
+
%p Display checkboxes to select up to 4 options
|
48
48
|
|
49
|
-
= f.show_if :category, 'Select
|
49
|
+
= f.show_if :category, 'Select up to 5' do
|
50
50
|
.card
|
51
51
|
.card-body
|
52
|
-
%h5 Select
|
53
|
-
%p Display checkboxes to select
|
52
|
+
%h5 Select up to 5 (five)
|
53
|
+
%p Display checkboxes to select up to 5 options
|
54
54
|
|
55
55
|
= f.show_if :category, 'Short Answer' do
|
56
56
|
.card
|
@@ -4,28 +4,36 @@ class EffectivePollsMailerPreview < ActionMailer::Preview
|
|
4
4
|
|
5
5
|
def poll_upcoming_reminder
|
6
6
|
poll_notification = build_poll_notification('The poll will start soon')
|
7
|
-
Effective::PollsMailer.poll_upcoming_reminder(poll_notification,
|
7
|
+
Effective::PollsMailer.poll_upcoming_reminder(poll_notification, build_user)
|
8
8
|
end
|
9
9
|
|
10
10
|
def poll_start
|
11
11
|
poll_notification = build_poll_notification('The poll has started')
|
12
|
-
Effective::PollsMailer.poll_start(poll_notification,
|
12
|
+
Effective::PollsMailer.poll_start(poll_notification, build_user)
|
13
13
|
end
|
14
14
|
|
15
15
|
def poll_reminder
|
16
16
|
poll_notification = build_poll_notification('The poll started already and you have not participated')
|
17
|
-
Effective::PollsMailer.poll_reminder(poll_notification,
|
17
|
+
Effective::PollsMailer.poll_reminder(poll_notification, build_user)
|
18
18
|
end
|
19
19
|
|
20
20
|
def poll_end
|
21
21
|
poll_notification = build_poll_notification('The poll has ended')
|
22
|
-
Effective::PollsMailer.poll_end(poll_notification,
|
22
|
+
Effective::PollsMailer.poll_end(poll_notification, build_user)
|
23
23
|
end
|
24
24
|
|
25
25
|
protected
|
26
26
|
|
27
|
-
def
|
28
|
-
|
27
|
+
def build_user
|
28
|
+
User.new(email: 'buyer@website.com').tap do |user|
|
29
|
+
user.name = 'Valued Customer' if user.respond_to?(:name=)
|
30
|
+
user.full_name = 'Valued Customer' if user.respond_to?(:full_name=)
|
31
|
+
|
32
|
+
if user.respond_to?(:first_name=) && user.respond_to?(:last_name=)
|
33
|
+
user.first_name = 'Valued'
|
34
|
+
user.last_name = 'Customer'
|
35
|
+
end
|
36
|
+
end
|
29
37
|
end
|
30
38
|
|
31
39
|
def build_poll_notification(text)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_polls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.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: 2021-
|
11
|
+
date: 2021-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|