lib/enjoy/controllers/contacts.rb in enjoy_cms-0.3.7.2 vs lib/enjoy/controllers/contacts.rb in enjoy_cms-0.3.7.3
- old
+ new
@@ -49,11 +49,12 @@
end
def process_ajax
true
end
def ajax_success
- render json: {ok: true}
+ render partial: success_partial
+ # render json: {ok: true}
end
def redirect_after_done
redirect_to :contacts_sent
end
def xhr_checker
@@ -66,9 +67,12 @@
def after_create
# overrideable hook for updating message
end
def form_partial
"enjoy/contacts/form"
+ end
+ def success_partial
+ "enjoy/contacts/success"
end
def model
Enjoy::ContactMessage
end
def message_params