require_dependency "educode_sales/application_controller" module EducodeSales class CustomerFollowsController < ApplicationController def create follow_up = EducodeSales::CustomerFollow.new(follow_up_params) follow_up.staff = @current_admin if follow_up.save render_success else render_failure follow_up end end def destroy follow_up = CustomerFollow.find(params[:id]) if follow_up.destroy render_success else render_failure follow_up end end def update follow_up = CustomerFollow.find(params[:id]) follow_up.assign_attributes(follow_up_params) if follow_up.save render_success else render_failure follow_up end end private def follow_up_params params.permit(:school_id, :department_id, :content) end end end