ruby codeclimate fixes

This commit is contained in:
Connor Turland 2017-10-13 12:22:05 -04:00
parent d51a22c5a9
commit f9c139c19e
2 changed files with 30 additions and 29 deletions

View file

@ -13,7 +13,7 @@ class NotificationsController < ApplicationController
receipt = @receipts.find_by(notification_id: notification.id)
NotificationDecorator.decorate(notification, receipt)
end
if notifications.length > 0
if !notifications.empty?
render json: notifications
else
render json: [].to_json

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
class NotificationDecorator
class << self
def decorate(notification, receipt)