added new stuff for thank you and security
This commit is contained in:
1 parent
84fca12445
commit
2db0db7aef
12 files changed
+151
-48
No files matched your search
@@ -481,7 +481,7 @@ class AsksController < ApplicationController
|
||||
if @must_verify_email
|
||||
redirect_to "#{params[:referer_url]}?method=see_email"
|
||||
else
|
||||
redirect_to "#{params[:referer_url]}?method=thank"
|
||||
redirect_to "#{params[:referer_url]}?method=thank&category=#{params['ask_question']['category_id']}"
|
||||
end
|
||||
else
|
||||
redirect_to "#{params[:referer_url]}?method=sorry"
|
||||
@@ -489,9 +489,10 @@ class AsksController < ApplicationController
|
||||
end
|
||||
|
||||
def thank
|
||||
acknowledgement = AskAcknowledgement.last
|
||||
acknowledgement = AskAcknowledgement.where(:category_id => params['category']).first rescue nil
|
||||
content = acknowledgement.nil? ? t('ask.thank_text') : acknowledgement.content
|
||||
{
|
||||
"acknowledgement" => acknowledgement
|
||||
"content" => content[I18n.locale]
|
||||
}
|
||||
end
|
||||
|
||||
@@ -650,6 +651,7 @@ class AsksController < ApplicationController
|
||||
def create_params
|
||||
params.require(:ask_question).permit!
|
||||
end
|
||||
|
||||
private
|
||||
def cal_form_from_setting(ask_setting,categories,show_categories=false,filter_fields=nil)
|
||||
is_cat_record = (ask_setting.class == AskCategorySetting)
|
||||
|
||||
Reference in new issue
Block a user