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/plans/index.json.jbuilder
2021-06-09 13:03:58 +02:00

9 lines
378 B
Ruby

# frozen_string_literal: true
json.array!(@plans) do |plan|
json.extract! plan, :id, :base_name, :name, :interval, :interval_count, :group_id, :training_credit_nb, :description, :type, :ui_weight,
:slug, :disabled, :monthly_payment, :plan_category_id
json.amount plan.amount / 100.00
json.plan_file_url plan.plan_file.attachment_url if plan.plan_file
end