#:enddoc: module RailsConnector class ContentCache < CmsBaseModel self.key_prefix = "cc" property :revision_id property :transferring_to # TODO remove when renaming workspace to revision in code def workspace_id revision_id end # 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