mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 10:14:59 +00:00
Add default order by for App model, remove order for Device as Activeadmin always order it in that way
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
class App < ActiveRecord::Base
|
class App < ActiveRecord::Base
|
||||||
|
|
||||||
default_scope {order("name")}
|
default_scope -> {order("name")}
|
||||||
|
|
||||||
has_many :batch_installations, dependent: :destroy
|
has_many :batch_installations, dependent: :destroy
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
class Device < ActiveRecord::Base
|
class Device < ActiveRecord::Base
|
||||||
default_scope {order ('id desc')}
|
|
||||||
|
|
||||||
enum status: [:active,:missing,:dead]
|
enum status: [:active,:missing,:dead]
|
||||||
|
|
||||||
attr_accessor :status
|
attr_accessor :status
|
||||||
|
|||||||
Reference in New Issue
Block a user