automation and view updates

This commit is contained in:
Jason Jordan
2026-04-17 15:35:10 -04:00
parent 247a075c9c
commit 7ab1143db8
30 changed files with 124704 additions and 602 deletions
+8 -3
View File
@@ -24,9 +24,14 @@ module IdCard
# API Methods
def get_plan_benefits
@plan_benefits = IdCard::Plan.find(params[:id]).plan_benefits
render json: @plan_benefits.as_json
def get_plan_template
@template_plan = IdCard::Plan.includes(:plan_benefits).find_by(id: params[:id], template: true)
render json: @template_plan.as_json(
only: [:title],
include: {
plan_benefits: { except: [:id, :plan_id, :created_at, :updated_at] }
}
)
end
private