ruby codeclimate fixes
This commit is contained in:
parent
d51a22c5a9
commit
f9c139c19e
2 changed files with 30 additions and 29 deletions
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
class NotificationDecorator
|
||||
class << self
|
||||
def decorate(notification, receipt)
|
||||
|
|
Loading…
Reference in a new issue