added category fix for table
This commit is contained in:
parent
2fedf64387
commit
b39ebe583c
|
@ -179,7 +179,12 @@ class Admin::UniversalTablesController < OrbitAdminController
|
||||||
table = UTable.where(:uid => uid).first
|
table = UTable.where(:uid => uid).first
|
||||||
table.update_attributes(p)
|
table.update_attributes(p)
|
||||||
table.save
|
table.save
|
||||||
cat = table.category
|
cat = table.category rescue nil
|
||||||
|
if cat.nil?
|
||||||
|
cat = Category.new
|
||||||
|
cat.module_app = @module_app
|
||||||
|
cat.save
|
||||||
|
end
|
||||||
cat.title_translations = p[:title_translations]
|
cat.title_translations = p[:title_translations]
|
||||||
cat.save
|
cat.save
|
||||||
redirect_to admin_universal_tables_path
|
redirect_to admin_universal_tables_path
|
||||||
|
|
Loading…
Reference in New Issue