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)
|
receipt = @receipts.find_by(notification_id: notification.id)
|
||||||
NotificationDecorator.decorate(notification, receipt)
|
NotificationDecorator.decorate(notification, receipt)
|
||||||
end
|
end
|
||||||
if notifications.length > 0
|
if !notifications.empty?
|
||||||
render json: notifications
|
render json: notifications
|
||||||
else
|
else
|
||||||
render json: [].to_json
|
render json: [].to_json
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
class NotificationDecorator
|
class NotificationDecorator
|
||||||
class << self
|
class << self
|
||||||
def decorate(notification, receipt)
|
def decorate(notification, receipt)
|
||||||
|
|
Loading…
Add table
Reference in a new issue