get_progress: align case and when as rubocop
This commit is contained in:
parent
e9ba87a49c
commit
28669ac635
1 changed files with 11 additions and 10 deletions
|
|
@ -28,7 +28,8 @@ class Target < ActiveRecord::Base
|
||||||
# ====Returns
|
# ====Returns
|
||||||
# * +String+ -> progress in percent
|
# * +String+ -> progress in percent
|
||||||
def get_progress
|
def get_progress
|
||||||
numerator = case unit
|
numerator =
|
||||||
|
case unit
|
||||||
when Target.units[:submissions]
|
when Target.units[:submissions]
|
||||||
conference.events.where('created_at < ?', due_date).count
|
conference.events.where('created_at < ?', due_date).count
|
||||||
when Target.units[:registrations]
|
when Target.units[:registrations]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue