fix error
This commit is contained in:
parent
b1d010d001
commit
688449f3f0
|
@ -157,8 +157,12 @@ class Admin::AsksController < OrbitAdminController
|
||||||
@table_fields = @ask_list_setting.default_fields.select{|f| @ask_setting.default_setting[f].nil? || @ask_setting.default_setting[f] }
|
@table_fields = @ask_list_setting.default_fields.select{|f| @ask_setting.default_setting[f].nil? || @ask_setting.default_setting[f] }
|
||||||
if @category_id.present?
|
if @category_id.present?
|
||||||
ask_setting = AskCategorySetting.where(:category_id=>@category_id, :use_default.ne=>true).first
|
ask_setting = AskCategorySetting.where(:category_id=>@category_id, :use_default.ne=>true).first
|
||||||
ask_setting = AskSetting.first if ask_setting.nil?
|
if ask_setting.nil?
|
||||||
tmp = ask_setting.custom_fields
|
ask_setting = AskSetting.first
|
||||||
|
tmp = ask_setting.custom_fields.map{|k,v| ["default@#{k}", v]}
|
||||||
|
else
|
||||||
|
tmp = ask_setting.custom_fields.map{|k,v| ["custom@#{k}", v]}
|
||||||
|
end
|
||||||
list_setting_custom_fields = @ask_list_setting.custom_fields
|
list_setting_custom_fields = @ask_list_setting.custom_fields
|
||||||
else
|
else
|
||||||
tmp = []
|
tmp = []
|
||||||
|
|
Loading…
Reference in New Issue