diff --git a/app/controllers/admin/asks_controller.rb b/app/controllers/admin/asks_controller.rb index 5526ff1..e48491d 100644 --- a/app/controllers/admin/asks_controller.rb +++ b/app/controllers/admin/asks_controller.rb @@ -85,7 +85,7 @@ class Admin::AsksController < OrbitAdminController redirect_to "/#{locale}/admin/asks/category_setting" end def setting - @ask_setting = AskSetting.first + @default_ask_setting = AskSetting.first @url = setting_save_admin_asks_path end def backend_table_setting diff --git a/app/views/admin/asks/setting.html.erb b/app/views/admin/asks/setting.html.erb index 22dfe9a..12b06e1 100644 --- a/app/views/admin/asks/setting.html.erb +++ b/app/views/admin/asks/setting.html.erb @@ -28,6 +28,6 @@ $('.add_new_options').sortable({'handle':'.icons-list-2'}); }) -<%= form_for @ask_setting,method: 'post',url: @url,html: { class: 'form-horizontal main-forms previewable' } do |f| %> - <%= render partial: 'ask_setting',locals:{ask_setting: @ask_setting,f: f,submit_text: t('submit'), :@has_email_regex => true} %> +<%= form_for @default_ask_setting,method: 'post',url: @url,html: { class: 'form-horizontal main-forms previewable' } do |f| %> + <%= render partial: 'ask_setting',locals:{ask_setting: @default_ask_setting,f: f,submit_text: t('submit'), :@has_email_regex => true} %> <% end %> \ No newline at end of file