Class: EducodeSales::CustomerFollowsController
Instance Method Summary
collapse
#authenticate_admin, #authenticate_request, #current_user, #filter, #is_commissioner_above?, #paginate, #render_failure, #render_success, #subject_members, #subject_staffs, #subject_url
#add_businesses_score, #base_url, #collection_amount_score, #completion_rate, #current?, #disk_filename, #get_businesses_chart, #handled_data, #handled_time_data, #handled_time_data_accurate, #relative_path, #signed_amount_score, #storage_path, #url_to_avatar, #visits_score
Instance Method Details
#create ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'app/controllers/educode_sales/customer_follows_controller.rb', line 5
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
|
#destroy ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'app/controllers/educode_sales/customer_follows_controller.rb', line 15
def destroy
follow_up = CustomerFollow.find(params[:id])
if follow_up.destroy
render_success
else
render_failure follow_up
end
end
|
#update ⇒ Object
24
25
26
27
28
29
30
31
32
|
# File 'app/controllers/educode_sales/customer_follows_controller.rb', line 24
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
|