effective_polls 0.1.1 → 0.1.2

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: 564dabc8a5490be5d5ebf050a0b4e718b69781dcc9b7d585e8644546f54288cd
4
- data.tar.gz: 1503bc14d59cc2e1b1d7a9938065b5ac687eb8b81defcc594fc95b74b7284009
3
+ metadata.gz: 601b913bc917fe4b2397d8affaa14fb4b5c6ef278b508e5cb20beabdb1fd7072
4
+ data.tar.gz: 0421da94ec80c2edd6f6c61d3fc6b05057a16696df7f584e40332410760cf665
5
5
  SHA512:
6
- metadata.gz: 811446095aa021a4eed57a83047f79debbdab3c931184ff748c6c36181202691d7a5c845b4b5c364a984b5785d9f661d8ca56268eec807c5c6cf95905d250e2d
7
- data.tar.gz: 8e5e682feb705f6a4891b734610fac4c6e5a90ae897119f04c63c28bf32ea2479fb041ca8653bf32876974bb52dd8c72cdebf7e8d29fe47ba1230572ebef9cbd
6
+ metadata.gz: e612861fa07f15913ec112cbe3b173beba9bd1623dae94116e0a5febead36dd3d5dcd94f5836e271bfb1455a210f0fe669e37eee5de422bbedc5e95d01364c10
7
+ data.tar.gz: c35df2a28b2c4ef6cce508facf758b69de2b3d8707139bac827a54c021359f670232c4e40a58558671b9dafdc73393d7fac185ca3c6f31b9c753b6ee1959869e
@@ -48,19 +48,19 @@ module Effective
48
48
  validates :poll_question_option_ids, if: -> { poll_question&.choose_one? },
49
49
  length: { maximum: 1, message: 'please choose 1 option only' }
50
50
 
51
- validates :poll_question_option_ids, if: -> { poll_question&.select_upto_1? },
51
+ validates :poll_question_option_ids, if: -> { poll_question&.select_up_to_1? },
52
52
  length: { maximum: 1, message: 'please select 1 option or fewer' }
53
53
 
54
- validates :poll_question_option_ids, if: -> { poll_question&.select_upto_2? },
54
+ validates :poll_question_option_ids, if: -> { poll_question&.select_up_to_2? },
55
55
  length: { maximum: 2, message: 'please select 2 options or fewer' }
56
56
 
57
- validates :poll_question_option_ids, if: -> { poll_question&.select_upto_3? },
57
+ validates :poll_question_option_ids, if: -> { poll_question&.select_up_to_3? },
58
58
  length: { maximum: 3, message: 'please select 3 options or fewer' }
59
59
 
60
- validates :poll_question_option_ids, if: -> { poll_question&.select_upto_4? },
60
+ validates :poll_question_option_ids, if: -> { poll_question&.select_up_to_4? },
61
61
  length: { maximum: 4, message: 'please select 4 options or fewer' }
62
62
 
63
- validates :poll_question_option_ids, if: -> { poll_question&.select_upto_5? },
63
+ validates :poll_question_option_ids, if: -> { poll_question&.select_up_to_5? },
64
64
  length: { maximum: 5, message: 'please select 5 options or fewer' }
65
65
 
66
66
  def to_s
@@ -78,7 +78,7 @@ module Effective
78
78
  return upload_file if poll_question.upload_file?
79
79
 
80
80
  return poll_question_options.first if poll_question.choose_one?
81
- return poll_question_options.first if poll_question.select_upto_1?
81
+ return poll_question_options.first if poll_question.select_up_to_1?
82
82
  return poll_question_options if poll_question.poll_question_option?
83
83
 
84
84
  raise('unknown response for unexpected poll question category')
@@ -1,3 +1,3 @@
1
1
  module EffectivePolls
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
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.1
4
+ version: 0.1.2
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-02-11 00:00:00.000000000 Z
11
+ date: 2021-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -130,11 +130,11 @@ files:
130
130
  - app/views/effective/ballot_responses/fields/_long_answer.html.haml
131
131
  - app/views/effective/ballot_responses/fields/_number.html.haml
132
132
  - app/views/effective/ballot_responses/fields/_select_all_that_apply.html.haml
133
- - app/views/effective/ballot_responses/fields/_select_upto_1.html.haml
134
- - app/views/effective/ballot_responses/fields/_select_upto_2.html.haml
135
- - app/views/effective/ballot_responses/fields/_select_upto_3.html.haml
136
- - app/views/effective/ballot_responses/fields/_select_upto_4.html.haml
137
- - app/views/effective/ballot_responses/fields/_select_upto_5.html.haml
133
+ - app/views/effective/ballot_responses/fields/_select_up_to_1.html.haml
134
+ - app/views/effective/ballot_responses/fields/_select_up_to_2.html.haml
135
+ - app/views/effective/ballot_responses/fields/_select_up_to_3.html.haml
136
+ - app/views/effective/ballot_responses/fields/_select_up_to_4.html.haml
137
+ - app/views/effective/ballot_responses/fields/_select_up_to_5.html.haml
138
138
  - app/views/effective/ballot_responses/fields/_short_answer.html.haml
139
139
  - app/views/effective/ballot_responses/fields/_upload_file.html.haml
140
140
  - app/views/effective/ballot_responses/responses/_choose_one.html.haml
@@ -143,11 +143,11 @@ files:
143
143
  - app/views/effective/ballot_responses/responses/_long_answer.html.haml
144
144
  - app/views/effective/ballot_responses/responses/_number.html.haml
145
145
  - app/views/effective/ballot_responses/responses/_select_all_that_apply.html.haml
146
- - app/views/effective/ballot_responses/responses/_select_upto_1.html.haml
147
- - app/views/effective/ballot_responses/responses/_select_upto_2.html.haml
148
- - app/views/effective/ballot_responses/responses/_select_upto_3.html.haml
149
- - app/views/effective/ballot_responses/responses/_select_upto_4.html.haml
150
- - app/views/effective/ballot_responses/responses/_select_upto_5.html.haml
146
+ - app/views/effective/ballot_responses/responses/_select_up_to_1.html.haml
147
+ - app/views/effective/ballot_responses/responses/_select_up_to_2.html.haml
148
+ - app/views/effective/ballot_responses/responses/_select_up_to_3.html.haml
149
+ - app/views/effective/ballot_responses/responses/_select_up_to_4.html.haml
150
+ - app/views/effective/ballot_responses/responses/_select_up_to_5.html.haml
151
151
  - app/views/effective/ballot_responses/responses/_short_answer.html.haml
152
152
  - app/views/effective/ballot_responses/responses/_upload_file.html.haml
153
153
  - app/views/effective/ballots/_ballot.html.haml