sort fixes and edit fix

This commit is contained in:
harrybomrah committed 2015-11-16 21:47:27 +08:00
1 parent 4ce8637c53
commit 52c12560ef
2 files changed
+5 -4

No files matched your search

@@ -15,7 +15,7 @@ class Admin::UniversalTablesController < OrbitAdminController
if !@table.nil?
@columns = @table.table_columns.asc(:order)
@table_fields = @columns.collect{|tc| tc.title}
@entries = @table.table_entries.page(params[:page_id]).per(10)
@entries = @table.table_entries.desc(:created_at).page(params[:page_id]).per(10)
end
end
@@ -37,8 +37,8 @@ class Admin::UniversalTablesController < OrbitAdminController
end
def edit_entry
id = params[:universal_table_id]
@entry = TableEntry.find(id)
id = params[:universal_table_id].split("-").last
@entry = TableEntry.where(:uid => id).first
@table = @entry.u_table
if !@table.nil?
@columns = @table.table_columns.asc(:order)