We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3e32095 + bbf09f9 commit 71fd0cdCopy full SHA for 71fd0cd
1 file changed
app/presenters/how_you_found_us_presenter.rb
@@ -1,5 +1,4 @@
1
class HowYouFoundUsPresenter
2
-
3
def initialize(chapter)
4
@chapter = chapter
5
end
@@ -15,7 +14,7 @@ def by_percentage
15
14
exact = (count / total_responses.to_f) * 100
16
percentage_value = exact.floor
17
remainder = exact - percentage_value
18
- { how: how, percentage_value: percentage_value, remainder: remainder }
+ { how:, percentage_value:, remainder: }
19
20
21
allocated_so_far = entries.sum { |entry| entry[:percentage_value] }
@@ -40,7 +39,7 @@ def data_present?
40
39
private
41
42
def raw_stats
43
- @stats ||= @chapter.members.where.not(how_you_found_us: nil).group(:how_you_found_us).count
+ @raw_stats ||= @chapter.members.where.not(how_you_found_us: nil).group(:how_you_found_us).count
44
45
46
def how_values
0 commit comments