This commit is contained in:
chiu 2020-07-26 15:54:19 +08:00
parent 1cfe929348
commit 9e670ae11f
1 changed files with 1 additions and 0 deletions

View File

@ -183,6 +183,7 @@ class Admin::PropertyHiresController < OrbitAdminController
prop = params.require(:property).permit! prop = params.require(:property).permit!
prop.delete(:property_location) if prop[:property_location] == "other" prop.delete(:property_location) if prop[:property_location] == "other"
notes_selector = prop["notes_selector"] notes_selector = prop["notes_selector"]
notes_selector = {} if notes_selector.nil?
prop["notes_selector"] = (0 ... notes_selector.keys.count).to_a.map{|k| k.to_s}.zip(notes_selector.values).to_h prop["notes_selector"] = (0 ... notes_selector.keys.count).to_a.map{|k| k.to_s}.zip(notes_selector.values).to_h
return prop return prop
end end