Class: Nexo::Element

Inherits:
ApplicationRecord show all
Defined in:
app/models/nexo/element.rb

Instance Method Summary collapse

Instance Method Details

#discarded?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'app/models/nexo/element.rb', line 59

def discarded?
  discarded_at.present?
end

#etagObject



51
52
53
# File 'app/models/nexo/element.rb', line 51

def etag
  last_remote_version&.etag
end

#last_remote_versionObject



55
56
57
# File 'app/models/nexo/element.rb', line 55

def last_remote_version
  element_versions.where.not(etag: nil).order(:etag).last
end

#policy_still_applies?Boolean

Returns:

  • (Boolean)


45
46
47
48
49
# File 'app/models/nexo/element.rb', line 45

def policy_still_applies?
  # :nocov: TODO
  folder.policy_applies?(synchronizable)
  # :nocov:
end