fix flow to work
This commit is contained in:
@@ -80,7 +80,7 @@ class DashboardController < ApplicationController
|
||||
redirect_to active_lists_supplier_path(Supplier.first)
|
||||
end
|
||||
|
||||
# POST /active_user_list_needs_help
|
||||
# POST /active_user_list_needs_help.json
|
||||
def active_user_list_needs_help
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
@@ -91,4 +91,16 @@ class DashboardController < ApplicationController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# POST /active_user_list_needs_payment.json
|
||||
def active_user_list_needs_payment
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
render json: {list_active: false} and return unless session[:active_list_id].present?
|
||||
active_list.needs_payment = true
|
||||
active_list.save
|
||||
render json: active_list.as_json.merge(list_active: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user