Sha256: 2fc205bb457c258377e1b098278309b913da1191c858ee84d7af6a0bb4600545

Contents?: true

Size: 656 Bytes

Versions: 2

Compression:

Stored size: 656 Bytes

Contents

#:enddoc:
module RailsConnector

class ContentCache < CmsBaseModel
  self.key_prefix = "cc"

  property :workspace_id
  property :transferring_to

  # returns the workspace that is represented by this content cache.
  # returns nil if the workspace cannot be found.
  def workspace
    @workspace ||= Workspace.find_by_id(workspace_id)
  end

  # returns the workspace that this content cache is currently transferring to.
  # returns nil if no transfer is taking place or if the workspace cannot be found.
  def transfer_target
    @transfer_target ||= transferring_to ? Workspace.find_by_id(transferring_to) : nil
  end
end

end # module RailsConnector

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
infopark_cloud_connector-6.8.0.beta.200.650.7c93155 lib/rails_connector/content_cache.rb
infopark_cloud_connector-6.8.0.beta.200.621.4c8e1b0 lib/rails_connector/content_cache.rb