Class: Nquery::Collection

Inherits:
ApplicationRecord show all
Defined in:
app/models/nquery/collection.rb

Defined Under Namespace

Classes: DashboardsController

Constant Summary collapse

KINDS =
%w[root personal standard].freeze

Instance Method Summary collapse

Instance Method Details

#archive!Object



27
28
29
# File 'app/models/nquery/collection.rb', line 27

def archive!
  update!(archived_at: Time.current)
end

#archived?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'app/models/nquery/collection.rb', line 23

def archived?
  archived_at.present?
end

#unarchive!Object



31
32
33
# File 'app/models/nquery/collection.rb', line 31

def unarchive!
  update!(archived_at: nil)
end