get_progress: align case and when as rubocop

This commit is contained in:
Björn Geuken 2015-04-17 14:19:32 +02:00
parent e9ba87a49c
commit 28669ac635

View file

@ -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]