Files

40 lines
564 B
Ruby
Raw Permalink Normal View History

2026-03-13 08:47:13 -04:00
module IdCard
class PlansController < ApplicationController
# View Methods
def new
end
def create
end
def edit
end
def update
end
def destroy
end
# API Methods
2026-04-17 15:35:10 -04:00
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] }
}
)
2026-03-13 08:47:13 -04:00
end
private
end
end