Method: EducodeSales::MoneyPlansController#edit

Defined in:
app/controllers/educode_sales/money_plans_controller.rb

#editObject



98
99
100
101
102
103
104
105
106
107
# File 'app/controllers/educode_sales/money_plans_controller.rb', line 98

def edit
  @money_plan = MoneyPlan.find(params[:id])
  gon.business_id = @money_plan.business_id
  gon.business = [{value: @money_plan.business_id.to_s, name: @money_plan.business&.name}]

  gon.edit_money_plan = can?(:update, EducodeSales::MoneyPlan)
  gon.edit_money_plan_self = can?(:update_self, EducodeSales::MoneyPlan)
  gon.staff_id = @current_admin.id
  render layout: false
end