1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/views/api/notifications/_notify_member_about_coupon.json.jbuilder

12 lines
590 B
Plaintext
Raw Normal View History

2016-08-16 18:12:13 +02:00
json.title notification.notification_type
if notification.attached_object.type == 'percent_off'
json.description t('.enjoy_a_discount_of_PERCENT_with_code_CODE',
PERCENT: notification.attached_object.percent_off,
CODE: notification.attached_object.code)
else
json.description t('.enjoy_a_discount_of_AMOUNT_with_code_CODE',
AMOUNT: number_to_currency(notification.attached_object.amount_off / 100.00),
CODE: notification.attached_object.code)
end
2016-08-16 18:12:13 +02:00
json.url notification_url(notification, format: :json)