Getting rid of plain sql in stats_controller
This commit is contained in:
parent
26236424cc
commit
7e930d8d40
2 changed files with 10 additions and 30 deletions
|
|
@ -1,7 +1,7 @@
|
|||
.row-fluid
|
||||
.span12
|
||||
%h3
|
||||
Non-free Tickets (#{@tickets.length if @tickets}#{0 unless @tickets})
|
||||
Non-free Tickets (#{@tickets})
|
||||
.row-fluid
|
||||
.span5
|
||||
- if @supporter_levels.count > 0
|
||||
|
|
@ -11,18 +11,18 @@
|
|||
%th #
|
||||
%th %
|
||||
- @supporter_levels.each do |level|
|
||||
- reg_support = reg_support(level)
|
||||
- if reg_support.count > 0
|
||||
- reg_count = level.supporter_registrations.count
|
||||
- if reg_count > 0
|
||||
%tr
|
||||
%td= level.title
|
||||
%td
|
||||
= reg_support.count
|
||||
= reg_count
|
||||
%td
|
||||
- if @registered and @registered > 0
|
||||
= "#{reg_support.count * 100 / @registered}% of registered"
|
||||
= "#{reg_count * 100 / @registered}% of registered"
|
||||
- if @attendees and @attendees > 0
|
||||
%br
|
||||
= "#{reg_support.count * 100 / @attendees}% of attendees"
|
||||
= "#{reg_count * 100 / @attendees}% of attendees"
|
||||
- else
|
||||
%p
|
||||
No tickets sold yet
|
||||
No tickets sold yet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue